Cartalyst\Sentinel\Sentinel::getUserRepository PHP Method

getUserRepository() public method

Returns the user repository.
public getUserRepository ( ) : Cartalyst\Sentinel\Users\UserRepositoryInterface
return Cartalyst\Sentinel\Users\UserRepositoryInterface
    public function getUserRepository()
    {
        return $this->users;
    }

Usage Example

Beispiel #1
0
 /**
  * Authenticate a user via the id.
  *
  * @param  mixed $id
  *
  * @return bool
  */
 public function byId($id)
 {
     if ($user = $this->sentinel->getUserRepository()->findById($id)) {
         $this->sentinel->setUser($user);
         return true;
     }
     return false;
 }
All Usage Examples Of Cartalyst\Sentinel\Sentinel::getUserRepository