_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(); } Qs_Http::redirect(BASE_URL_LANGUAGE . '/admin/login'); } }