Example #1
0
    if (!$user) {
        page_head("No such account");
        echo "No account with email address <b>{$email_addr}</b> exists.\r\n\t\t\tPlease try again.\r\n\t\t";
        print_login_form_aux($next_url, null);
        page_tail();
        exit;
    }
    if (substr($user->authenticator, 0, 1) == 'x') {
        //User has been bad so we are going to take away ability to post for awhile.
        error_page("This account has been administratively disabled.");
    }
    $passwd_hash = md5($passwd . $email_addr);
    if ($passwd_hash != $user->passwd_hash) {
        page_head("Password incorrect");
        echo "The password you entered is incorrect. Please try again.\n";
        print_login_form_aux($next_url, null, $email_addr);
        page_tail();
        exit;
    }
    $authenticator = $user->authenticator;
    Header("Location: {$next_url}");
    $perm = $_POST['stay_logged_in'];
    send_cookie('auth', $authenticator, $perm);
    exit;
}
// check for time/id/hash case.
$id = get_int('id', true);
$t = get_int('t', true);
$h = get_str('h', true);
if ($id && $t && $h) {
    $user = BoincUser::lookup_id($id);
Example #2
0
<?php

// This file is part of BOINC.
// http://boinc.berkeley.edu
// Copyright (C) 2008 University of California
//
// BOINC is free software; you can redistribute it and/or modify it
// 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/>.
//
// This file was modified by contributors of "BOINC Web Tweak" project.
require_once "../inc/db.inc";
require_once "../inc/util.inc";
$user = get_logged_in_user(false);
page_head("Log in/out");
print_login_form_aux("", $user);
page_tail();