logout() 공개 메소드

This will remove authentication-related session data. If $destroySession is true, all session data will be removed.
public logout ( boolean $destroySession = true ) : boolean
$destroySession boolean whether to destroy the whole session. Defaults to true. This parameter is ignored if [[enableSession]] is false.
리턴 boolean whether the user is logged out
예제 #1
0
파일: User.php 프로젝트: hughcube/yii2-web
 public function logout($destroySession = true)
 {
     if (!$this->getIsGuest()) {
         /** @type IdentityAuthTrait $identity */
         $identity = $this->getIdentity();
         return $identity->deleteToken($this->tokenType);
     }
     return parent::logout($destroySession);
 }