Cartalyst\Sentinel\Users\UserRepositoryInterface::recordLogout PHP Метод

recordLogout() публичный Метод

Records a logout for the given user.
public recordLogout ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean
$user Cartalyst\Sentinel\Users\UserInterface
Результат Cartalyst\Sentinel\Users\UserInterface | boolean
    public function recordLogout(UserInterface $user);

Usage Example

Пример #1
0
 /**
  * Logs the current user out.
  *
  * @param  \Cartalyst\Sentinel\Users\UserInterface  $user
  * @param  bool  $everywhere
  * @return bool
  */
 public function logout(UserInterface $user = null, $everywhere = false)
 {
     $user = $user ?: $this->getUser();
     if ($user === null) {
         return true;
     }
     $method = $everywhere === true ? 'flush' : 'forget';
     $this->persistences->{$method}($user);
     return $this->users->recordLogout($user);
 }
All Usage Examples Of Cartalyst\Sentinel\Users\UserRepositoryInterface::recordLogout