コード例 #1
0
 /**
  * @param Interfaces\AuthUser $userToAuthenticate
  * @return bool
  */
 public function required(Interfaces\AuthUser $userToAuthenticate)
 {
     return !is_null($userToAuthenticate->getTwoFactorSecret());
 }
コード例 #2
0
ファイル: Authenticate.php プロジェクト: pmill/php-auth
 /**
  * @param AuthUser $userToAuthenticate
  */
 public function loginUser(AuthUser $userToAuthenticate)
 {
     $this->loggedInUserId = $userToAuthenticate->getAuthId();
     $this->session->set('loggedInUserId', $this->loggedInUserId);
 }