diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index 2d71b00953..579b37b01d 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -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; }