Frontend\Modules\Profiles\Actions\Logout::execute PHP Method

execute() public method

Execute the extra.
public execute ( )
    public function execute()
    {
        // logout
        if (FrontendProfilesAuthentication::isLoggedIn()) {
            FrontendProfilesAuthentication::logout();
        }
        // trigger event
        FrontendModel::triggerEvent('Profiles', 'after_logout');
        // redirect
        $this->redirect(SITE_URL);
    }
Logout