Cartalyst\Sentinel\Sentinel::loginAndRemember PHP 메소드

loginAndRemember() 공개 메소드

Persists a login for the given user, with the "remember" flag.
public loginAndRemember ( Cartalyst\Sentinel\Users\UserInterface $user ) : Cartalyst\Sentinel\Users\UserInterface | boolean
$user Cartalyst\Sentinel\Users\UserInterface
리턴 Cartalyst\Sentinel\Users\UserInterface | boolean
    public function loginAndRemember(UserInterface $user)
    {
        return $this->login($user, true);
    }

Usage Example

예제 #1
0
 public function postRegister(CredentialsRequest $request)
 {
     if ($user = $this->sentinel->registerAndActivate($this->getRequestData($request))) {
         $this->sentinel->loginAndRemember($user);
         $this->setResponseData($user->toArray());
     } else {
         $this->setErrorData("Can't create user");
     }
     return $this->responseJson();
 }
All Usage Examples Of Cartalyst\Sentinel\Sentinel::loginAndRemember