コード例 #1
0
ファイル: Guard.php プロジェクト: devonzara/framework
 /**
  * Create a new remember token for the user if one doesn't already exist.
  *
  * @param  \Illuminate\Contracts\Auth\User  $user
  * @return void
  */
 protected function createRememberTokenIfDoesntExist(UserContract $user)
 {
     $rememberToken = $user->getRememberToken();
     if (empty($rememberToken)) {
         $this->refreshRememberToken($user);
     }
 }
コード例 #2
0
 /**
  * Validate a user against the given credentials.
  *
  * @param  \Illuminate\Contracts\Auth\User  $user
  * @param  array  $credentials
  * @return bool
  */
 public function validateCredentials(UserContract $user, array $credentials)
 {
     $plain = $credentials['password'];
     return $this->hasher->check($plain, $user->getAuthPassword());
 }