From 46d7ecf80de589b47c269c802f53ed88a082185a Mon Sep 17 00:00:00 2001 From: Uwe Steinmann Date: Thu, 26 Feb 2015 11:47:28 +0100 Subject: [PATCH] do not even check for guest user, if disabled --- op/op.Login.php | 10 ++++++---- 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/op/op.Login.php b/op/op.Login.php index 8d5bb8c39..4287b64b9 100644 --- a/op/op.Login.php +++ b/op/op.Login.php @@ -58,10 +58,12 @@ if(isset($_POST['pwd'])) { } } -$guestUser = $dms->getUser($settings->_guestID); -if ((!isset($pwd) || strlen($pwd)==0) && ($login != $guestUser->getLogin())) { - _printMessage(getMLText("login_error_title"), getMLText("login_error_text")."\n"); - exit; +if($settings->_enableGuestLogin && (int) $settings->_guestID) { + $guestUser = $dms->getUser((int) $settings->_guestID); + if ((!isset($pwd) || strlen($pwd)==0) && ($login != $guestUser->getLogin())) { + _printMessage(getMLText("login_error_title"), getMLText("login_error_text")."\n"); + exit; + } } //