cache = $cache; $this->cookie = $cookie; $this->session = $session; } protected function post(array $request = []) { // @todo check if POST is really used here $this->rawContent($request); } /** * Process logout requests */ protected function rawContent(array $request = []) { $visitor_home = null; if ($this->session->getRemoteUserId()) { $visitor_home = $this->session->getMyUrl(); $this->cache->delete('zrlInit:' . $visitor_home); } Hook::callAll("logging_out"); // If this is a trusted browser, redirect to the 2fa signout page if ($this->cookie->get('2fa_cookie_hash')) { $this->baseUrl->redirect('2fa/signout'); } $this->cookie->clear(); $this->session->clear(); if ($visitor_home) { System::externalRedirect($visitor_home); } else { DI::sysmsg()->addInfo($this->t('Logged out.')); $this->baseUrl->redirect(); } } }