diff --git a/html/user/create_account.php b/html/user/create_account.php index a84305bf46..145c5704e3 100644 --- a/html/user/create_account.php +++ b/html/user/create_account.php @@ -13,7 +13,9 @@ xml_header(); $config = get_config(); if (parse_bool($config, "disable_account_creation")) { + echo ""; echo "-208\n"; + echo ""; exit(); } @@ -23,12 +25,16 @@ $passwd_hash = process_user_text(get_str("passwd_hash")); $user_name = process_user_text(get_str("user_name")); if (!is_valid_email_addr($email_addr)) { + echo ""; echo "-205\n"; + echo ""; exit(); } if (strlen($passwd_hash) != 32) { + echo ""; echo "-206\n"; + echo ""; exit(); } @@ -38,11 +44,15 @@ $now = time(); $query = "insert into user (create_time, email_addr, name, authenticator, send_email, show_hosts, cross_project_id, passwd_hash) values($now, '$email_addr', '$user_name', '$authenticator', 1, 1, '$cross_project_id', '$authenticator')"; $result = mysql_query($query); if (!$result) { + echo ""; echo "-207\n"; + echo ""; exit(); } -echo "0\n"; + +echo ""; echo "$authenticator\n"; +echo ""; ?> diff --git a/html/user/lookup_account.php b/html/user/lookup_account.php index 62b233f940..eb45344e62 100644 --- a/html/user/lookup_account.php +++ b/html/user/lookup_account.php @@ -16,12 +16,15 @@ $passwd_hash = process_user_text(get_str("passwd_hash")); $user = lookup_user_email_addr($email_addr); if (!$user) { + echo ""; echo "-161\n"; + echo ""; exit(); } -echo "0 -$user->authenticator -"; + +echo ""; +echo "$user->authenticator"; +echo ""; ?>