mirror of https://github.com/BOINC/boinc.git
*** empty log message ***
svn path=/trunk/boinc/; revision=7226
This commit is contained in:
parent
67824b0412
commit
fc91bc7ef0
|
@ -13,7 +13,9 @@ xml_header();
|
|||
|
||||
$config = get_config();
|
||||
if (parse_bool($config, "disable_account_creation")) {
|
||||
echo "<account_out>";
|
||||
echo "<error_num>-208</error_num>\n";
|
||||
echo "</account_out>";
|
||||
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 "<account_out>";
|
||||
echo "<error_num>-205</error_num>\n";
|
||||
echo "</account_out>";
|
||||
exit();
|
||||
}
|
||||
|
||||
if (strlen($passwd_hash) != 32) {
|
||||
echo "<account_out>";
|
||||
echo "<error_num>-206</error_num>\n";
|
||||
echo "</account_out>";
|
||||
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 "<account_out>";
|
||||
echo "<error_num>-207</error_num>\n";
|
||||
echo "</account_out>";
|
||||
exit();
|
||||
}
|
||||
echo "<error_num>0</error_num>\n";
|
||||
|
||||
echo "<account_out>";
|
||||
echo "<authenticator>$authenticator</authenticator>\n";
|
||||
echo "</account_out>";
|
||||
|
||||
?>
|
||||
|
||||
|
|
|
@ -16,12 +16,15 @@ $passwd_hash = process_user_text(get_str("passwd_hash"));
|
|||
|
||||
$user = lookup_user_email_addr($email_addr);
|
||||
if (!$user) {
|
||||
echo "<account_out>";
|
||||
echo "<error_num>-161</error_num>\n";
|
||||
echo "</account_out>";
|
||||
exit();
|
||||
}
|
||||
echo "<error_num>0</error_num>
|
||||
<authenticator>$user->authenticator</authenticator>
|
||||
";
|
||||
|
||||
echo "<account_out>";
|
||||
echo "<authenticator>$user->authenticator</authenticator>";
|
||||
echo "</account_out>";
|
||||
|
||||
?>
|
||||
|
||||
|
|
Loading…
Reference in New Issue