handle case where email account is disabled
This commit is contained in:
parent
11de7a88ae
commit
f73aec13f4
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue
Block a user