2003-02-21 01:38:16 +00:00
|
|
|
<?php
|
|
|
|
|
2005-03-28 22:26:22 +00:00
|
|
|
require_once("../inc/db.inc");
|
|
|
|
require_once("../inc/util.inc");
|
|
|
|
require_once("../inc/email.inc");
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-03-28 22:26:22 +00:00
|
|
|
db_init();
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-03-28 22:26:22 +00:00
|
|
|
$id = get_int("id");
|
|
|
|
$str = process_user_text(get_str("str"));
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-03-28 22:26:22 +00:00
|
|
|
$user = lookup_user_id($id);
|
|
|
|
if (!$user) {
|
|
|
|
error_page("No such user");
|
|
|
|
}
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-03-28 22:26:22 +00:00
|
|
|
page_head("Verify email address change");
|
|
|
|
if (split_munged_email_addr($user->email_addr, $str, $new_email)) {
|
|
|
|
$new_email = trim(strtolower($new_email));
|
|
|
|
$result = mysql_query("update user set email_addr='$new_email' where id=$user->id");
|
|
|
|
if ($result) {
|
|
|
|
echo "Email address change verified";
|
2003-02-21 01:38:16 +00:00
|
|
|
} else {
|
2005-03-28 22:26:22 +00:00
|
|
|
echo "Verification failed due to database error. Please try again later.";
|
2003-02-21 01:38:16 +00:00
|
|
|
}
|
2005-03-28 22:26:22 +00:00
|
|
|
} else {
|
|
|
|
echo "
|
|
|
|
We weren't expecting a verification of this account's email address.
|
|
|
|
Please request the change again.
|
|
|
|
";
|
|
|
|
}
|
|
|
|
page_tail();
|
2003-02-21 01:38:16 +00:00
|
|
|
|
|
|
|
?>
|