User logout controller action.

@return void
505441
public function logout()
    {
        Http\Session::getInstance()->set('id', null)->set('email', null);
        Http\Server::getInstance()->redirect(RouteCollection::getInstance()->get('login')->getUri());
    }
718444
public function logoutAction() {
        // never cache the logout request
        $this->_helper->cache->setNoCacheHeaders($this->getResponse());

        $auth = Garp_Auth::getInstance();
        $userData = $auth->getUserData();
        $this->_beforeLogout($userData);

        $auth->destroy();
        $authVars = $auth->getConfigValues();
        $target = '/';
        if ($authVars && !empty($authVars['logout']['successUrl'])) {
            $target = $authVars['logout']['successUrl'];
        }

        // Remove the role cookie
        if (!$auth->getStore() instanceof Garp_Store_Cookie) {
            $this->_removeRoleCookie();
        }

        $this->_afterLogout($userData);

        $flashMessenger = $this->_helper->getHelper('FlashMessenger');
        $flashMessenger->addMessage(__($authVars['logout']['successMessage']));

        $cacheBuster = 'action=logout';
        $target .= (strpos($target, '?') === false ? '?' : '&') . $cacheBuster;
        $this->_helper->viewRenderer->setNoRender(true);
        $this->_redirect($target);
    }
554813
public function logout()
    {
        $this->_session->delete('auth');
        $this->_session->delete('expire');
        $this->_session->delete('_token');
        $this->_session->delete('_token_meta');

        return $this->check() ? false : true;
    }
272671
public function logout(): void
	{
		$this->session->regenerateId();

		$this->session->regenerateToken();

		$this->session->remove($this->options['auth_key']);

		$this->response->getCookies()->delete($this->options['auth_key'], $this->options['cookie_options']);

		$this->user = null;

		$this->hasLoggedOut = true;
	}
1214981
public function logout()
		{

			// Am I authenticated?
			if ($this->isAuthenticated() == false) {

				// Cannot logout!
				return false;

			}

			// Destroy my session
			$this->_authenticated = false;
			unset($_SESSION[self::$_sessionPrefix . $this->name]);
			$this->_user = null;
			return true;

		}
1111361
public function logout()
    {
        $this->core->auth()->logout();

        return redirect()->route(
            $this->core->prefixRoute(NamedRoute::AUTH_LOGIN)
        );
    }
1358811
public function logout(): void
    {
        Internal\Cookies::setList(Internal\Cookies::TYPE_SERVER, [
            ['name' => '_s', 'value' => 'deleted', 'expire' => 0],
            ['name' => '_a', 'value' => 'deleted', 'expire' => 0]
        ]);
        self::$cache = [];
    }
1245571
public function adm_logout() {
		if (!$this->store_is_logged_in())
			return [AdminStoreError::USER_NOT_LOGGED_IN];

		# this just close sessions with current sid, whether it exists
		# or not, including the case of account self-deletion
		$this->store_close_session($this->user_data['sid']);

		# reset status
		$this->store_reset_status();

		# router must set appropriate cookie

		$this->logger->info(sprintf(
			"Zapmin: logout: OK: '%s'.",
			$this->user_data['uname']
		));
		return [0];
	}
867404
public function logout()
    {
        $oUserModel = Factory::model('User', 'nails/module-auth');
        $oUserModel->clearRememberCookie();

        // --------------------------------------------------------------------------

        //  null the remember_code so that auto-logins stop
        $oDb = Factory::service('Database');
        $oDb->set('remember_code', null);
        $oDb->where('id', activeUser('id'));
        $oDb->update(NAILS_DB_PREFIX . 'user');

        // --------------------------------------------------------------------------

        //  Destroy key parts of the session (enough for user_model to report user as logged out)
        $oUserModel->clearLoginData();

        // --------------------------------------------------------------------------

        //  Destroy CI session
        $oSession = Factory::service('Session', 'nails/module-auth');
        $oSession->destroy();

        // --------------------------------------------------------------------------

        //  Destroy PHP session if it exists
        if (session_id()) {
            session_destroy();
        }

        // --------------------------------------------------------------------------

        return true;
    }
411548
public function logout()
    {
        if (!$this->_socket) {
            return;
        }

        try {
            $this->request('QUIT');
        } catch (Zend_Mail_Protocol_Exception $e) {
            // ignore error - we're closing the socket anyway
        }

        fclose($this->_socket);
        $this->_socket = null;
    }
118893
protected function execLogout()
    {
        $logoutService = $this->authFactory->newLogoutService();
        $auth = $this->authFactory->newInstance();
        $logoutService->logout($auth);
        $this->httpResponse = $this->httpResponse->withHeader('Location', '/' . $this->configuration['areas'][AREA]['authentication']['loginURL']);
    }
1125329
public function logout()
    {
        $this->getAuthenticationAdapter()->resetAdapters();
        $this->getAuthenticationAdapter()->logoutAdapters();
        $this->getAuthenticationService()->clearIdentity();
    }
491432
public function logout() {
		$this->logger->log( LogLevel::DEBUG, 'Logging out' );
		$result = $this->postRequest( new SimpleRequest( 'logout' ) );
		if ( $result === [] ) {
			$this->isLoggedIn = false;
			$this->clearTokens();
			return true;
		}
		return false;
	}
1347656
public function actionLogout() {

		// Logout User
		Yii::$app->user->logout();

		// Destroy Session
		Yii::$app->session->destroy();

		// Redirect User to appropriate page
		return $this->redirect( [ Yii::$app->core->getLogoutRedirectPage() ] );
	}
1048833
public static function Logout(){
            $oThis = self::CreateInstanceIfNotExists();

            if($oThis->bStarted){
                session_unset();
                unset($_SESSION[$oThis->sName]["authentication"]);
                unset($oThis->aAuth);
            }
        }
238372
public function logout() {
        $this->debug('logout', $this->Cookie, $this->Auth->user());
        $this->delete();
    }
1207832
public function logout()
    {

        // load the authentication manager and try to authenticate this request
        /** @var \AppserverIo\Psr\Auth\AuthenticationManagerInterface $authenticationManager */
        if ($authenticationManager = $this->getAuthenticationManager()) {
            // try to load the authentication managers default authenticator
            if (($authenticator = $authenticationManager->getAuthenticator()) == null) {
                throw new ServletException('Can\'t find default authenticator');
            }

            // logout the actual user
            $authenticator->logout($this);
        }
    }