2003-02-21 01:38:16 +00:00
|
|
|
<?php
|
|
|
|
|
2003-08-22 05:36:25 +00:00
|
|
|
require_once("db.inc");
|
2003-02-21 01:38:16 +00:00
|
|
|
require_once("util.inc");
|
|
|
|
|
|
|
|
db_init();
|
|
|
|
|
2003-02-27 22:30:31 +00:00
|
|
|
$id = $_GET["id"];
|
|
|
|
$str = $_GET["str"];
|
2003-02-21 01:38:16 +00:00
|
|
|
|
|
|
|
$user = null;
|
|
|
|
$result = mysql_query("select * from user where id=$id");
|
|
|
|
if ($result) {
|
|
|
|
$user = mysql_fetch_object($result);
|
|
|
|
}
|
|
|
|
|
|
|
|
page_head("Verify email address change");
|
|
|
|
if ($user) {
|
|
|
|
if (split_munged_email_addr($user->email_addr, $str, $new_email)) {
|
|
|
|
$result = mysql_query("update user set email_addr='$new_email' where id=$user->id");
|
|
|
|
if ($result) {
|
|
|
|
echo "Email address change verified";
|
|
|
|
} else {
|
|
|
|
echo "Verification failed due to database error. Please try again later.";
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
$user = null;
|
|
|
|
}
|
|
|
|
} else {
|
|
|
|
echo "User not found";
|
|
|
|
}
|
|
|
|
if (!$user) {
|
|
|
|
echo "We weren't expecting a verification of this account's email address. Please request the change again.";
|
|
|
|
}
|
|
|
|
page_tail();
|
|
|
|
|
|
|
|
?>
|