} else { // Attempt to authenticate the user's credentials $user_id = authenticate_user($email, sha1($pwd)); if (is_null($user_id)) { // indicates an error echo 'null'; exit(1); } else { if (!$user_id) { // indicates failed authentication echo 'false'; exit(0); } } // attempt to get the user's privileges and details (deets) $auths = get_user_auths($user_id); $deets = get_user_deets($user_id); if (is_null($auths) || is_null($deets)) { echo 'null'; exit(1); } $deets['auths'] = $auths; // Mark logged in and copy this info over to the session $_SESSION['logged'] = true; foreach ($deets as $key => $val) { if ($key == 'user_id') { $_SESSION[$key] = (int) $val; } else { $_SESSION[$key] = $val; } }
$this->Priority = $this->priority; } } if (!$limitedStartup) { if ($config['softdebug'] == 1) { $starttime = microtime(); $data->reset_counter(); } $cookievalue = md5(time() . 'um'); $expire = time() + $config['session_length']; if ($config['gzip'] == 1) { $tpl->load_filter('output', 'gzip'); } if (!$skipUser) { $check = $Auth->page_check(); $user_page_auths = get_user_auths(); $user_groups = user_groups_id_key_array($check['id']); $onlineUserList = get_online_users_array(); $userIdList = get_user_id_list_array(); } $censorWords = get_censor(); $scoutlanguage = read_scout_language(); $tpl->assign("scoutlang", $scoutlanguage); } $timestamp = time(); } else { require_once "config.php"; require_once "includes/db.php"; require_once "includes/functions.php"; $data = new database($dbname, $dbhost, $dbusername, $dbpassword, $dbprefix, $dbport); $config = read_config();