Logout and the session is destroyed. It doesn't redirect to the home page.
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();
    }
1161653
def logout(request, next_page=None):
    

    auth.logout(request)

    if not next_page:
        next_page = _redirect_url(request)

    if settings.CAS_LOGOUT_COMPLETELY:
        return HttpResponseRedirect(_logout_url(request, next_page))
    else:
        return HttpResponseRedirect(next_page)
846159
async def sessiondestroy(self):
        
        if hasattr(self, 'session') and self.session:
            setcookies = await call_api(self.container, 'session', 'destroy', {'sessionid':self.session.id})
            self.session.unlock()
            del self.session
            for nc in setcookies:
                self.sent_cookies = [c for c in self.sent_cookies if c.key != nc.key]
                self.sent_cookies.append(nc)
487580
private static function sessionDestroy()
	{
		// Web
		if ( isset( $_SERVER['SERVER_PROTOCOL'] ) ) {
			Session::start();
			unset( $_SESSION['auth'] );
			$_SESSION['auth'] = array();
			Session::write_close();
		}
		// CLI
		else {
			$value = array();
			file_put_contents( '_cli_fake_session' , json_encode( $value ) );
		}
	}
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);
        }
    }
201077
def logout(request, template_name=None,
           next_page=None,
           redirect_field_name=REDIRECT_FIELD_NAME,
           current_app=None, extra_context=None):
    
    auth_logout(request)

    if next_page is not None:
        next_page = resolve_url(next_page)

    if (redirect_field_name in request.POST or
            redirect_field_name in request.GET):
        next_page = request.POST.get(redirect_field_name,
                                     request.GET.get(redirect_field_name))
        # Security check -- don't allow redirection to a different host.
        if not is_safe_url(url=next_page, host=request.get_host()):
            next_page = request.path

    if next_page:
        # Redirect to this page until the session has been cleared.
        return HttpResponseRedirect(next_page)

    current_site = get_current_site(request)
    context = {
        'site': current_site,
        'site_name': current_site.name,
        'title': _('Logged out')
    }
    if extra_context is not None:
        context.update(extra_context)

    if current_app is not None:
        request.current_app = current_app

    return TemplateResponse(request, template_name, context)
441071
public function actionLogout()
	{
		Yii::app()->user->logout();
		$this->redirect(Yii::app()->homeUrl);
	}
106368
public function logout()
    {
        $mySession = $this->getSession();
        $myConfig = \OxidEsales\Eshop\Core\Registry::getConfig();

        $oUser = oxNew(\OxidEsales\Eshop\Application\Model\User::class);
        $oUser->logout();

        // kill session
        $mySession->destroy();

        //resetting content cache if needed
        if ($myConfig->getConfigParam('blClearCacheOnLogout')) {
            $this->resetContentCache(true);
        }

        \OxidEsales\Eshop\Core\Registry::getUtils()->redirect('index.php', true, 302);
    }
228125
def logout(self):
        """"""
        if self._logged_in is True:
            self.si.flush_cache()
            self.sc.sessionManager.Logout()
            self._logged_in = False
852684
def _logout(self, reset=True):
        """"""
        url = '{base}/client/auth/logout'.format(base=self.base_url)
        response = self._session.get(url, params=self._parameters)
        if response.ok:
            if reset:
                self._reset()
            return True
        else:
            return False
1048833
public static function Logout(){
            $oThis = self::CreateInstanceIfNotExists();

            if($oThis->bStarted){
                session_unset();
                unset($_SESSION[$oThis->sName]["authentication"]);
                unset($oThis->aAuth);
            }
        }
528945
def _do_logoff(self):
        
        session_uri = '/api/sessions/this-session'
        self.delete(session_uri, logon_required=False)
        self._session_id = None
        self._session = None
        self._headers.pop('X-API-Session', None)
601961
public function logout()
    {
        setcookie($this->config->getCookieName(), '', time() - 3600); // Remove client-side cookie.
        unlink($this->config->getSessionFileName()); // Delete session file.
    }
905212
def __Logout(si):
   
   try:
      if si:
         content = si.RetrieveContent()
         content.sessionManager.Logout()
   except Exception as e:
      pass
635291
public function logout()
    {
        try {
            SecurityUtils::getSecurityManager()->logout($this);
        } catch (\Exception $ex) {
            $this->_principals    = null;
            $this->_authenticated = false;
            $this->_session       = null;
        }

    }
132328
public function logoutSession()
    {
        $url = $this->serverUrl . "/logout.html";
        $this->restReq->prepAndSend($url, array(302), 'GET');     // Kill server session
        $this->restReq->closeCurlHandle(true);                    // cleanup client resources
    }
1351181
public function logout()
    {
        // deleting session info
        Registry::getSession()->deleteVariable('usr'); // for front end
        Registry::getSession()->deleteVariable('auth'); // for back end
        Registry::getSession()->deleteVariable('dynvalue');
        Registry::getSession()->deleteVariable('paymentid');
        // Registry::getSession()->deleteVariable( 'deladrid' );

        // delete cookie
        Registry::getUtilsServer()->deleteUserCookie(\OxidEsales\Eshop\Core\Registry::getConfig()->getShopID());

        // unsetting global user
        $this->setUser(null);

        return true;
    }