コード例 #1
0
ファイル: class.session.php プロジェクト: Strikethegod/fanzub
 protected function VerifyLogin($username, $password_md5, $password_length)
 {
     try {
         $this->user = User::FindByName($username);
     } catch (Exception $e) {
         // User not found
         throw new Session_AccessViolationException('Login failed: username and/or password are incorrect.');
     }
     // Verify password
     if (!$this->user->VerifyPassword($password_md5, $password_length)) {
         $this->user = null;
         throw new Session_AccessViolationException('Login failed: username and/or password are incorrect.');
     }
 }