_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 (Qs_SiteMap::getAliasByItem('ECommerce_Cart_')) { $cartObj = new CartObj(); $cartObj->clearSessionCartObject(); } if (isset($identity['autologinCode'])) { $authAdapter = new AuthAdapter(); $authAdapter->clearAutologinCode($identity['autologinCode']); } Zend_Session::destroy(); } $redirectUrl = BASE_URL_LANGUAGE; if (isset($this->_options['loginAlias'])) { $redirectUrl .= '/' . $this->_options['loginAlias']; } Qs_Http::redirect($redirectUrl); } }