_doc->setAuth($auth); $this->_getLog()->setAction('logout', 'Logged out'); $this->_getLog()->write('logout'); $this->_getLog()->markSessionClosed(); if ($auth->hasIdentity()) { $identity = $auth->getIdentity(); $auth->clearIdentity(); if (isset($identity['autologinCode'])) { $authAdapter = new App_Admin_AuthAdapter(); $authAdapter->clearAutologinCode($identity['autologinCode']); } Zend_Session::destroy(); } //@todo AdminPath $adminPath = (0 === strpos(CURRENT_PAGE, 'tribal-admin')) ? 'tribal-admin' : 'admin'; Qs_Http::redirect(BASE_URL_LANGUAGE . '/' . $adminPath . '/login'); } }