Index: signup.module =================================================================== --- signup.module (revision 222) +++ signup.module (working copy) @@ -700,6 +700,23 @@ } } } + + // If this new user's email address matches any anonymous signups, + // link the new user to those signups so they can manage them + $sql = "SELECT * FROM {signup_log} WHERE uid = 0 AND anon_mail = '%s'"; + $signups = db_query($sql, $account->mail); + while ($signup = db_fetch_object($signups)) { + // Remove the anonymous email + $signup->anon_mail = ''; + // Set the uid + $signup->uid = $account->uid; + // Add the username to the form data + $signup->form_data = unserialize($signup->form_data); + $signup->form_data['Name'] = $account->name; + $signup->form_data = serialize($signup->form_data); + // Update the signup record + drupal_write_record('signup_log', $signup, 'sid'); + } } }