This will remove authentication-related session data.
If $destroySession is true, all session data will be removed.
public function logout($destroySession = true) { if (!$this->getIsGuest()) { /** @type IdentityAuthTrait $identity */ $identity = $this->getIdentity(); return $identity->deleteToken($this->tokenType); } return parent::logout($destroySession); }