From 199ff770daf63d9cca1d6783f7994f2a7f233bb8 Mon Sep 17 00:00:00 2001 From: mdtrooper Date: Thu, 26 Feb 2015 12:27:18 +0100 Subject: [PATCH] Fixed the create new remote user in Active Directory (enterprise). TICKET: #1845 (cherry picked from commit 7b08fb47c197ee8acb5c289e09b1208e4c59b8aa) --- pandora_console/godmode/setup/setup_auth.php | 5 +++++ pandora_console/include/auth/mysql.php | 1 + 2 files changed, 6 insertions(+) diff --git a/pandora_console/godmode/setup/setup_auth.php b/pandora_console/godmode/setup/setup_auth.php index 2c29c91633..ee611fae05 100644 --- a/pandora_console/godmode/setup/setup_auth.php +++ b/pandora_console/godmode/setup/setup_auth.php @@ -85,6 +85,11 @@ for ($i = 2; $i <= 11; $i++) { $table->rowclass[$i] = 'ldap'; } +// Set the rows autocreation for Active Directory +for ($i = 2; $i <= 5; $i++) { + $table->rowclass[$i] .= ' ' . 'ad'; +} + // Hide fallback option when local authentication is selected. $table->rowstyle[1] = $config['auth'] == 'mysql' ? 'display: none;' : ''; $table->rowclass[1] = 'remote'; diff --git a/pandora_console/include/auth/mysql.php b/pandora_console/include/auth/mysql.php index dca6610b5c..acd6bfbd43 100644 --- a/pandora_console/include/auth/mysql.php +++ b/pandora_console/include/auth/mysql.php @@ -234,6 +234,7 @@ function process_user_login_remote ($login, $pass, $api = false) { // 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 database or incorrect password"; + return false; }