2002-08-07 18:56:55 +00:00
|
|
|
<?php
|
|
|
|
|
|
|
|
require_once("db.inc");
|
2003-08-22 05:36:25 +00:00
|
|
|
require_once("util.inc");
|
2002-08-07 18:56:55 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
|
|
|
page_head("Password");
|
2003-08-31 00:18:45 +00:00
|
|
|
$email_addr = trim($HTTP_POST_VARS["email_addr"]);
|
2002-12-06 21:37:30 +00:00
|
|
|
if (strlen($email_addr)) {
|
2002-08-07 18:56:55 +00:00
|
|
|
$query = sprintf(
|
|
|
|
"select * from user where email_addr = '%s'",
|
2002-12-06 21:37:30 +00:00
|
|
|
$email_addr
|
2002-08-07 18:56:55 +00:00
|
|
|
);
|
|
|
|
$result = mysql_query($query);
|
|
|
|
$user = mysql_fetch_object($result);
|
|
|
|
mysql_free_result($result);
|
2003-08-31 00:18:45 +00:00
|
|
|
send_auth_email($user->email_addr, $user->authenticator);
|
2002-08-07 18:56:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
if (!$user) {
|
2002-12-06 23:25:16 +00:00
|
|
|
echo "There is no user with that email address. <br>
|
2003-08-31 00:18:45 +00:00
|
|
|
Try reentering your email address.<p>
|
|
|
|
";
|
2002-12-06 21:37:30 +00:00
|
|
|
} else {
|
|
|
|
echo "Your account key has been emailed to ".$email_addr.".<p>";
|
2002-08-07 18:56:55 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
page_tail();
|
|
|
|
|
2002-12-06 21:37:30 +00:00
|
|
|
?>
|