connect(); $Me -> goIfInvalid("../"); ?> header("Merge Account Information From Two Accounts") ?> errorMsg("The first and second email addresses don't match"); } else if ($firstEmail == "") { $Conf->errorMsg("You specified an empty email string"); } else if ($passwd == "") { $Conf->errorMsg("You need to specify a password"); } else { // // Look up that account // $MiniMe = new Contact(); $MiniMe -> lookupByEmail($firstEmail, $Conf); if ($MiniMe->contactId == $Me -> contactId) { $Conf->errorMsg("You can't merge yourself with yourself"); } else if (! $MiniMe -> valid() || $MiniMe -> password != $passwd) { $Conf-> errorMsg("Either the other acccount doesn't " . " exist or you specified the wrong password"); } else { $Conf->infoMsg("You match -- updating database!"); $message = "Your account at the $Conf->shortName conference site " . " has been merged with the account of \n" . $Me->fullname() . " ( " . $Me -> email . " )\n"; $message .= "If you suspect something fishy, contact the " . "conference contact (" . $Conf -> contactEmail . " )\n"; mail($MiniMe->email, "Account information for $conf->shortName", $message, "From: $conf->emailFrom"); // // Now, scan through all the tables that possibly // specify a contactID and change it from their 2nd // contactID to their first contactId // $oldid = $MiniMe->contactId; $newid = $Me->contactId; // // Paper // $Conf->qe("UPDATE Paper SET contactId=$newid WHERE " . " contactId=$oldid"); $Conf->qe("UPDATE PaperAuthor SET authorId=$newid WHERE " . " authorId=$oldid"); $Conf->qe("UPDATE PaperConflict SET authorId=$newid WHERE " . " authorId=$oldid"); $Conf->qe("UPDATE PCMember SET contactId=$newid WHERE " . " contactId=$oldid"); $Conf->qe("UPDATE Chair SET contactId=$newid WHERE " . " contactId=$oldid"); $Conf->qe("UPDATE TopicInterest SET contactId=$newid WHERE " . " contactId=$oldid"); $Conf->qe("UPDATE ReviewRequest SET asked=$newid WHERE " . " asked=$oldid"); $Conf->qe("UPDATE ReviewRequest SET requestedBy=$newid WHERE " . " requestedBy=$oldid"); $Conf->qe("UPDATE PrimaryReviewer SET reviewer=$newid WHERE " . " reviewer=$oldid"); $Conf->qe("UPDATE SecondaryReviewer SET reviewer=$newid WHERE " . " reviewer=$oldid"); $Conf->qe("UPDATE PaperReview SET reviewer=$newid WHERE " . " reviewer=$oldid"); // // Remove the contact record // $Conf->qe("DELETE From ContactInfo WHERE contactId=$oldid"); $Conf->log("Merged account $oldid into $Me->contactId", $Me); } } } ?> infoMsg( "You may have multiple accounts registered with the " . $Conf->shortName . " conference, usually because " . "multiple people asked you to review a paper using" . "different email addresses." . "This may make it" . "more difficult to keep track of your different papers." . "If you have been informed of multiple accounts, you" . "can enter the email address and the password" . "of the secondary account here and press the \"MERGE\"" . "button. This will then merge all the information from" . "the account you specify into this account (papers, reviews, etc)." . "
" . "If you simply want to change your email address, you can update " . "that in the \"update contact information\" page." ); ?>
Email To Merge
Email To Merge Again
Password of that account
footer() ?>