public function checkAccount() { global $_F; $auth_raw = $_COOKIE['auth']; if ($auth_raw) { list($uid, $auth_str) = explode('_', $auth_raw); $table = new DB_Table('members'); $user = $table->find('uid=' . $uid); if ($user) { if (md5($user['username'] . '_' . $user['password']) == $auth_str) { $_F['uid'] = $uid; $_F['username'] = $user['username']; $_F['real_name'] = $user['real_name']; return true; } } } return false; }