Logs out the current user.

@return bool
TRUE if successful, FALSE otherwise.
325941
public function logout() {
		// Make sure we're logged in and have a valid access token.
		if (!$this->auth_token || !$this->username) {
			return FALSE;
		}

		$timestamp = parent::timestamp();
		$result = parent::post(
			'/logout',
			array(
				'timestamp' => $timestamp,
				'username' => $this->username,
			),
			array(
				$this->auth_token,
				$timestamp,
			)
		);

		// Clear out the cache in case the instance is recycled.
		$this->cache = NULL;

		return is_null($result);
	}
199402
public function logout()
        {
            $cookie = new Cookie();
            $cookie->delete(static::USER_SESSION);
            $session = new Session();
            $session->delete(static::USER_SESSION);

            return true;
        }
392882
public function logout()
    {
        if (!$this->is_loggedin) {
            return false;
        }

        $this->exec_curl('/logout');
        $this->is_loggedin = false;
        $this->cookies     = '';

        return true;
    }
655857
public function logout($globalLogout=true)
    {
        $this->isLoggingOut = true;

        /** @var UserIdentity $identity */
        $identity = Yii::$app->user->identity;
        if($globalLogout)
            Yii::$app->user->logout();

        try {
            if($identity != null && !empty($identity->sid))
            {
                $token = $this->getAccessToken()->token;
                $headers = [
                    'Authorization' => 'Bearer ' . $token
                ];
                $params = [
                    'sid' => $identity->sid
                ];
                $this->api($this->logoutUrl, 'GET', $params, $headers);
            }
        } catch (Exception $e) {
            Yii::$app->response->redirect(Yii::$app->getHomeUrl());
        }
        return true;
    }
424654
public function logout() {
        $this->user="";
        $this->password="";
        $this->isLogged=false;
        if ($this->useCookie) {
            unset($_COOKIE['phpcookiesess']);
            setcookie('phpcookiesess', null, -1, '/');
        }
        @session_destroy();
        @session_write_close();
    }
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']);
    }
1140466
def logout(self):
        
        from flask_login import logout_user, current_user
        if not current_user.is_authenticated:
            return True

        # logout otherwise
        user = current_user
        events.logout_event.send(user)
        logout_user()

        # notify principal
        app = current_app._get_current_object()
        identity_changed.send(app, identity=AnonymousIdentity())

        return True
1175984
public function actionLogout()
    {
        Yii::$app->user->logout();

        // handle redirect
        $logoutRedirect = $this->module->logoutRedirect;
        if ($logoutRedirect) {
            return $this->redirect($logoutRedirect);
        }
        return $this->goHome();
    }
151856
public function processLogout()
    {
        $this->getToken()->deleteUserToken();
        if ($this->getUser()->isAuthenticated()) {
            $this->getAuthProvider($this->user->getAuthProviderName())->logoutCallback();
        }
        $this->user = new AnonymousUser();
        $this->userAuthenticated = false;

        $this->eventManager()->fire(SecurityEvent::LOGOUT);

        return true;
    }
185822
public function logout()
    {
        $this->storeAuthenticationResult(AuthenticationResult::LOGOUT);

        $this->setIdentity(null)->setCredential(null);

        return $this->authenticateCreateAuthResult();
    }
146167
public function logout()
    {
        // Unset authenticated session
        $security = $this->container->accessHandler;
        $security->endAuthenticatedSession();

        // Unset CSRF Token
        $csrfGuard = $this->container->csrfGuard;
        $csrfGuard->unsetToken();

        return $this->redirect('home');
    }
1170463
public function logout()
	{
		$acct = $this->acct();

		// If we have an event dispatcher instance, we can fire off the logout event
		// so any further processing can be done. This allows the developer to be
		// listening for anytime a acct signs out of this application manually.
		$this->clearAcctDataFromStorage();

		if ( !is_null( $this->acct ) )
			$this->refreshRememberToken( $acct );

		Hooks::trigger( 'acct.logout', compact( 'acct' ) );

		// Once we have fired the logout event we will clear the accts out of memory
		// so they are no longer available as the acct is no longer considered as
		// being signed into this application and should not be available here.
		$this->acct = null;
		$this->loggedOut = true;
	}
1020141
public function logout()
    {
        $this->execute($this->httpClient->setEndPoint(self::ENDPOINT.'logout/'));

        self::$appKey = null;
        self::$sessionToken = null;
        self::$lastLogin = null;
    }
1131316
public function logout()
    {
        Piwik::postEvent('Login.logout', array(Piwik::getCurrentUserLogin()));

        self::clearSession();

        $logoutUrl = @Config::getInstance()->General['login_logout_url'];
        if (empty($logoutUrl)) {
            Piwik::redirectToModule('CoreHome');
        } else {
            Url::redirectToUrl($logoutUrl);
        }
    }
1326706
public function actionSignout() {
        Yii::$app->user->logout();
        // redirect
        $logoutRedirect = $this->module->logoutRedirect;
        if ($logoutRedirect === null) {
            return $this->goHome();
        } else {
            return $this->redirect($logoutRedirect);
        }
    }
1159593
public function logout()
    {
        $this->user = null;
        return $this->jwt->isHealthy()
                ? $this->jwt->invalidateToken()
                : null;
    }
651283
public function logout()
    {
        if (!$this->hasSudoed()) {
            return false;
        }

        $this->auth->logout();

        $originalUserId = $this->session->get($this->sessionKey);

        if ($originalUserId) {
            $this->auth->loginUsingId($originalUserId);
        }

        $this->session->forget($this->sessionKey);
        $this->session->forget('sudosu.has_sudoed');

        return true;
    }