if (isset($update_email) && empty($error)) { $email_tid = $user->verify_email($update_email); if (!$email_tid) { $error .= "The email address '{$update_email}' is already used by another account\n"; } } if (empty($error)) { if (($user->status == 'Suspended' || $user->status == 'Deleted') && (isset($user->update['name']) || isset($update_email))) { echo "You are suspended or deleted and not allowed to change your screen name or email address\n"; exit; } if (!isset($user->update['name'])) { $tpl->set_var("name", ""); } if (!isset($user->update['password'])) { $tpl->set_var("password", ""); } if (!isset($update_email)) { $tpl->set_var("email", ""); } else { $tpl->set_var(array("TID" => $email_tid, "NEWEMAIL" => $update_email)); } $tpl->set_var("error", ""); } else { $tpl->set_var("name", ""); $tpl->set_var("email", ""); $tpl->set_var("password", ""); $tpl->set_var("ERROR", nl2br($error)); } $tpl->set_var("token", $user->token()); print generate_page('Edit Account', $tpl->parse("content", "edit"));