From f73aec13f4d91d6282af7b676e7c2bda3562e04f Mon Sep 17 00:00:00 2001 From: Matthew Saunders Brown Date: Thu, 29 Aug 2024 12:53:28 -0700 Subject: [PATCH] handle case where email account is disabled --- panel/classes/Panel/Login.php | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/panel/classes/Panel/Login.php b/panel/classes/Panel/Login.php index 5ec3d7b..383e5b0 100644 --- a/panel/classes/Panel/Login.php +++ b/panel/classes/Panel/Login.php @@ -79,7 +79,12 @@ class Login extends \Panel { if ($auth->login($username, $password)) { /* user passed smtp auth, check for admin access */ if ($email_array = $f3->call('\Panel::vGet', array("vmail-mboxes-get.sh -e $username -c", FALSE))) { - if ($email_array[0]['status'] == '1') { + if ($email_array[0]['status'] == '0') { + /* email account isdisabled */ + $messages[] = "The email account $username is disabled. Please contact support for further assistance."; + $f3->set('SESSION.messages', $messages); + echo \Template::instance()->render('login.html'); + } elseif ($email_array[0]['status'] == '1') { $messages[] = "Email validated, but does not have admin privileges."; $messages[] = "Please log in with an admin account."; $f3->set('SESSION.messages', $messages);