account creation fix

svn path=/trunk/boinc/; revision=7550
This commit is contained in:
David Anderson 2005-08-29 23:00:59 +00:00
parent e9cb866128
commit 6b5a9fdfbc
2 changed files with 9 additions and 9 deletions

View File

@ -11110,3 +11110,9 @@ David 28 Aug 2005
WizAttachProject.cpp
lib/
parse.C
David 29 Aug 2005
- bug fix in account creation
html/user/
create_account_action.php

View File

@ -73,15 +73,9 @@ $postal_code = strip_tags(process_user_text($_POST["postal_code"]));
$authenticator = random_string();
$cross_project_id = random_string();
$query = sprintf(
"insert into user (create_time, email_addr, name, authenticator, country, postal_code, total_credit, expavg_credit, expavg_time, project_prefs, teamid, venue, url, send_email, show_hosts, cross_project_id, passwd_hash) values(%d, '%s', '%s', '%s', '%s', '%s', 0, 0, 0, '$project_prefs', $teamid, 'home', '', 1, 1, '$cross_project_id', '$authenticator')",
time(),
$email_addr,
$new_name,
$authenticator,
boinc_real_escape_string($country),
$postal_code
);
$country = boinc_real_escape_string($country);
$now = time();
$query = "insert into user (create_time, email_addr, name, authenticator, country, postal_code, total_credit, expavg_credit, expavg_time, project_prefs, teamid, venue, url, send_email, show_hosts, cross_project_id) values($now, '$new_email_addr', '$new_name', '$authenticator', '$country', '$postal_code', 0, 0, 0, '$project_prefs', $teamid, 'home', '', 1, 1, '$cross_project_id')";
$result = mysql_query($query);
if (!$result) {
show_error("Couldn't create account");