The default implementation will trigger the [[EVENT_BEFORE_LOGOUT]] event.
If you override this method, make sure you call the parent implementation
so that the event is triggered.
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_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. }