From 84c8a777f806dae122b9b9a69c97732ac5554a2b Mon Sep 17 00:00:00 2001 From: Alexander Ebert Date: Sun, 2 Jun 2013 17:07:18 +0200 Subject: [PATCH] Forcing application ACP-Login unless no applications available --- wcfsetup/install/files/lib/acp/form/LoginForm.class.php | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php index c6cf6321ec..3be61ed022 100755 --- a/wcfsetup/install/files/lib/acp/form/LoginForm.class.php +++ b/wcfsetup/install/files/lib/acp/form/LoginForm.class.php @@ -5,6 +5,7 @@ use wcf\form\AbstractForm; use wcf\system\application\ApplicationHandler; use wcf\system\exception\PermissionDeniedException; use wcf\system\exception\UserInputException; +use wcf\system\request\RouteHandler; use wcf\system\user\authentication\EmailUserAuthentication; use wcf\system\user\authentication\UserAuthenticationFactory; use wcf\system\WCF; @@ -53,6 +54,11 @@ class LoginForm extends AbstractForm { if (WCF::getUser()->userID) { throw new PermissionDeniedException(); } + else if (PACKAGE_ID == 1 && PACKAGE_ID != ApplicationHandler::getInstance()->getPrimaryApplication()->packageID) { + $application = ApplicationHandler::getInstance()->getPrimaryApplication(); + HeaderUtil::redirect(RouteHandler::getProtocol() . $application->domainName . $application->domainPath . 'acp/index.php/Login/'); + exit; + } parent::__run(); } -- 2.20.1