From a89b58a8a2f7d6ba2532d8c0c7e0379fa635f46e Mon Sep 17 00:00:00 2001 From: Cameron Date: Tue, 15 Jun 2021 15:37:45 -0700 Subject: [PATCH] Allow users to login when maintenance mode is active and is permitted. --- e107_handlers/redirection_class.php | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/e107_handlers/redirection_class.php b/e107_handlers/redirection_class.php index 6f3b000b8..eb488504a 100644 --- a/e107_handlers/redirection_class.php +++ b/e107_handlers/redirection_class.php @@ -219,8 +219,13 @@ class redirection { // if not admin - $allowed = e107::getPref('maintainance_flag'); - + $allowed = e107::getPref('maintainance_flag'); + + if(defset('e_PAGE') === 'login.php' && empty($_POST)) // allow admins/members to login. + { + return null; + } + // if(!ADMIN // or if not mainadmin - ie e_UC_MAINADMIN // || (e_UC_MAINADMIN == e107::getPref('maintainance_flag') && !getperms('0')))