protected beforeLogout ( yii\web\IdentityInterface $identity ) : boolean | ||
$identity | yii\web\IdentityInterface | the user identity information |
return | boolean | whether the user should continue to be logged out |
protected function beforeLogout($identity)
{
$event = new UserEvent(['identity' => $identity]);
$this->trigger(self::EVENT_BEFORE_LOGOUT, $event);
return $event->isValid;
}
protected function beforeLogout($identity) { $event_result = parent::beforeLogout($identity); // let a change to plugins to authorize or not this logon if ($this->getHook()->has_filter('cruge_beforelogout')) { return $this->getHook()->apply_filters('cruge_beforelogout', array($identity, $event_result)); } else { return $event_result; } // no filters setted. }