Cake\Controller\Component\AuthComponent::logout PHP 메소드

logout() 공개 메소드

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
리턴 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']);
    }