From: Tim Düsterhus Date: Tue, 8 Jan 2013 17:07:22 +0000 (+0100) Subject: Improve LogoutAction X-Git-Tag: 2.0.0_Beta_1~578 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b859b67fea3f4a52682c86fe4436f2cda0205247;p=GitHub%2FWoltLab%2FWCF.git Improve LogoutAction --- diff --git a/wcfsetup/install/files/lib/acp/action/LogoutAction.class.php b/wcfsetup/install/files/lib/acp/action/LogoutAction.class.php index ed8d5646b5..9053d45ca6 100755 --- a/wcfsetup/install/files/lib/acp/action/LogoutAction.class.php +++ b/wcfsetup/install/files/lib/acp/action/LogoutAction.class.php @@ -1,8 +1,7 @@ * @package com.woltlab.wcf * @subpackage acp.action * @category Community Framework */ class LogoutAction extends AbstractSecureAction { + /** + * @see wcf\action\AbstractAction::$loginRequired + */ + public $loginRequired = true; + /** * @see wcf\action\IAction::execute() */ public function execute() { parent::execute(); - - // validate - if (!WCF::getUser()->userID) { - throw new IllegalLinkException(); - } - + // do logout WCF::getSession()->delete(); @@ -35,9 +34,7 @@ class LogoutAction extends AbstractSecureAction { // forward to index page // warning: if doLogout() writes a cookie this is buggy in MS IIS - $application = ApplicationHandler::getInstance()->getActiveApplication(); - $path = $application->getPageURL() . 'acp/index.php' . SID_ARG_1ST; - HeaderUtil::redirect($path); + HeaderUtil::redirect(LinkHandler::getInstance()->getLink('Login')); exit; } }