2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
|
|
|
|
2004-02-02 23:34:39 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/util.inc");
|
2004-11-18 20:01:12 +00:00
|
|
|
require_once("../inc/email.inc");
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2005-03-23 03:04:56 +00:00
|
|
|
$email_addr = process_user_text(strtolower($_POST["email_addr"]));
|
2005-04-15 18:43:53 +00:00
|
|
|
if (!strlen($email_addr)) {
|
|
|
|
error_page("no address given");
|
|
|
|
}
|
|
|
|
$user = lookup_user_email_addr($email_addr);
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
if (!$user) {
|
2005-03-23 03:04:56 +00:00
|
|
|
page_head("No such user");
|
|
|
|
echo "There is no user with email address $email_addr. <br>
|
2003-08-31 00:18:45 +00:00
|
|
|
Try reentering your email address.<p>
|
|
|
|
";
|
2002-12-06 21:37:30 +00:00
|
|
|
} else {
|
2006-04-03 23:09:20 +00:00
|
|
|
if (substr($user->authenticator, 0, 1) == 'x') {
|
|
|
|
page_head("Account Currently Disabled");
|
|
|
|
echo "This account has been administratively disabled.";
|
|
|
|
} else {
|
|
|
|
$user->email_addr = $email_addr;
|
|
|
|
page_head("Mailed account key");
|
|
|
|
$retval = send_auth_email($user, false);
|
|
|
|
if ($retval) {
|
|
|
|
email_sent_message($email_addr);
|
|
|
|
} else {
|
|
|
|
echo "Can't send email to $user->email_addr: $retval";
|
|
|
|
}
|
|
|
|
}
|
2002-08-07 18:56:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
page_tail();
|
|
|
|
|
2002-12-06 21:37:30 +00:00
|
|
|
?>
|