2003-02-21 01:38:16 +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");
|
2003-02-21 01:38:16 +00:00
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2005-02-13 06:13:33 +00:00
|
|
|
$id = get_int("id");
|
|
|
|
$str = process_user_text(get_str("str"));
|
2003-02-21 01:38:16 +00:00
|
|
|
|
2005-02-15 22:29:32 +00:00
|
|
|
$user = lookup_user_id($id);
|
|
|
|
if (!$user) {
|
|
|
|
error_page("No such user");
|
2003-02-21 01:38:16 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
page_head("Verify email address change");
|
2005-02-15 22:29:32 +00:00
|
|
|
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-02-15 22:29:32 +00:00
|
|
|
echo "Verification failed due to database error. Please try again later.";
|
2003-02-21 01:38:16 +00:00
|
|
|
}
|
|
|
|
} else {
|
2005-02-15 22:29:32 +00:00
|
|
|
echo "
|
|
|
|
We weren't expecting a verification of this account's email address.
|
|
|
|
Please request the change again.
|
|
|
|
";
|
2003-02-21 01:38:16 +00:00
|
|
|
}
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|