- finish up the auto-team feature

svn path=/trunk/boinc/; revision=21033
This commit is contained in:
David Anderson 2010-03-30 20:58:39 +00:00
parent 826e3e56de
commit 1d6fccfbe8
3 changed files with 17 additions and 4 deletions

View File

@ -2278,3 +2278,10 @@ Rom 30 Mar 2010
clientgui/
TermsOfUsePage.cpp
David 30 Mar 2010
- finish up the auto-team feature
html/user/
account_finish_action.php
create_account.php

View File

@ -50,8 +50,14 @@ if (!$retval) {
error_page("database error");
}
Header("Location: team_search.php");
// team may have already been joined in create_account RPC.
// if so, skip team-finder
//
if ($user->teamid) {
Header("Location: home.php");
} else {
Header("Location: team_search.php");
}
send_cookie('auth', $auth, true);
send_cookie('init', "1", true);
?>

View File

@ -46,7 +46,7 @@ $email_addr = get_str("email_addr");
$email_addr = strtolower($email_addr);
$passwd_hash = get_str("passwd_hash");
$user_name = get_str("user_name");
$team_name = get_str("user_name", true);
$team_name = get_str("team_name", true);
if (!is_valid_email_addr($email_addr)) {
xml_error(-205);
@ -79,7 +79,7 @@ if ($user) {
if ($team_name) {
$team_name = BoincDb::escape_string($team_name);
$team = BoincTeam::lookup("name='$name'");
$team = BoincTeam::lookup("name='$team_name'");
if ($team && $team->joinable) {
user_join_team($team, $user);
}