Cake\Controller\Component\AuthComponent::logout PHP Méthode

logout() public méthode

Returns the logout action to redirect to. Triggers the Auth.logout event which the authenticate classes can listen for and perform custom logout logic.
public logout ( ) : string
Résultat string Normalized config `logoutRedirect`
    public function logout()
    {
        $this->_setDefaults();
        if (empty($this->_authenticateObjects)) {
            $this->constructAuthenticate();
        }
        $user = (array) $this->user();
        $this->dispatchEvent('Auth.logout', [$user]);
        $this->storage()->redirectUrl(false);
        $this->storage()->delete();
        return Router::normalize($this->_config['logoutRedirect']);
    }