getByToken() 공개 메소드

Get a user by login token.
public getByToken ( string $token ) : stdclass
$token string
리턴 stdclass | bool
예제 #1
0
파일: OwlUserProvider.php 프로젝트: owl/owl
 /**
  * Retrieve a user by unique token and identifier.
  *
  * @param mixed   $identifier
  * @param string  $token
  *
  * @return \Illuminate\Contracts\Auth\Authenticatable|null
  */
 public function retrieveByToken($identifier, $token)
 {
     $user = $this->userService->getByToken($token);
     if (!$user) {
         return null;
     }
     return $this->getOwlUser($user);
 }
예제 #2
0
파일: AuthService.php 프로젝트: owl/owl
 public function autoLoginCheck()
 {
     $token = \Request::cookie('remember_token');
     if ($user = $this->userService->getByToken($token)) {
         $this->deleteOldRememberToken($token);
         $remember = true;
         $this->login($user, $remember);
         return true;
     }
     return false;
 }