Change form to login when permission has changed to user. Tiquet:

This commit is contained in:
m-lopez-f 2015-08-04 09:30:53 +02:00
parent 395414c1c3
commit 741442009d
1 changed files with 12 additions and 3 deletions
pandora_console/include/auth

View File

@ -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;
}