} if (!is_valid_country($country)) { echo "bad country"; exit; } $postal_code = ''; $user = make_user($new_email_addr, $new_name, $passwd_hash, $country, $postal_code, $project_prefs = "", $teamid = 0); if (!$user) { show_error("Couldn't create account"); } if (defined('INVITE_CODES')) { error_log("Account '{$new_email_addr}' created using invitation code '{$invite_code}'"); } } // Log-in user in the web // In success case, redirect to a fixed page so that user can // return to it without getting "Repost form data" stuff $next_url = post_str('next_url', true); $next_url = sanitize_local_url($next_url); if ($next_url) { Header("Location: " . URL_BASE . "{$next_url}"); } else { Header("Location: " . URL_BASE . "home.php"); send_cookie('init', "1", true); send_cookie('via_web', "1", true); } send_cookie('auth', $user->authenticator, true); } } catch (ErrorException $e) { echo $e->getMessage(); }
// under the terms of the GNU Lesser General Public License // as published by the Free Software Foundation, // either version 3 of the License, or (at your option) any later version. // // BOINC is distributed in the hope that it will be useful, // but WITHOUT ANY WARRANTY; without even the implied warranty of // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. // See the GNU Lesser General Public License for more details. // // You should have received a copy of the GNU Lesser General Public License // along with BOINC. If not, see <http://www.gnu.org/licenses/>. require_once "../inc/db.inc"; require_once "../inc/util.inc"; require_once "../inc/account.inc"; check_get_args(array("next_url")); $next_url = sanitize_local_url(get_str('next_url', true)); $next_url = urldecode($next_url); $u = "login_form.php?next_url=" . $next_url; redirect_to_secure_url($u); $user = get_logged_in_user(false); if ($user) { page_head("Already logged in"); row2("You are logged in as {$user->name}", ". <a href=\"logout.php?" . url_tokens($user->authenticator) . "\">Log out</a>"); page_tail(); exit; } page_head(tra("Log in")); if (0) { echo ' <a href="openid_login.php?openid_identifier=https://www.google.com/accounts/o8/id"><img src=img/google-button.png></a> <a href="openid_login.php?openid_identifier=http://yahoo.com"><img src=img/yahoo-button.png></a>