Change form to login when permission has changed to user. Tiquet: #2566
This commit is contained in:
parent
395414c1c3
commit
741442009d
pandora_console/include/auth
|
@ -218,7 +218,7 @@ function process_user_login_remote ($login, $pass, $api = false) {
|
|||
// Unknown authentication method
|
||||
default:
|
||||
$config["auth_error"] = "User not found in database
|
||||
or incorrect password";
|
||||
or incorrect password";
|
||||
return false;
|
||||
break;
|
||||
}
|
||||
|
@ -232,15 +232,23 @@ function process_user_login_remote ($login, $pass, $api = false) {
|
|||
$return = enterprise_hook ('prepare_permissions_groups_of_user_ad',
|
||||
array ($login, $pass, false, true));
|
||||
|
||||
if (!$return) {
|
||||
if ($return === "error_permissions") {
|
||||
$config["auth_error"] = __("Problems with configuration
|
||||
permissions. Please contact with Administrator");
|
||||
return false;
|
||||
}
|
||||
else
|
||||
{
|
||||
if ($return === "permissions_changed") {
|
||||
$config["auth_error"] = __("Please your permmission has change. Login Again");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return $login;
|
||||
}
|
||||
|
||||
|
||||
// The user does not exist and can not be created
|
||||
if ($config['autocreate_remote_users'] == 0 || is_user_blacklisted ($login)) {
|
||||
$config["auth_error"] = __("Ooops User not found in
|
||||
|
@ -274,8 +282,9 @@ function process_user_login_remote ($login, $pass, $api = false) {
|
|||
}
|
||||
profile_create_user_profile ($login,
|
||||
$config['default_remote_profile'],
|
||||
$config['default_remote_group']);
|
||||
$config['default_remote_group']);
|
||||
}
|
||||
|
||||
return $login;
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue