From 54d95c510bbfdee6f65ae08eb5c6be472e07d7a4 Mon Sep 17 00:00:00 2001 From: Aladin Alaily Date: Fri, 14 Aug 2015 10:31:40 -0400 Subject: [PATCH] Update the code to reflect a possible active flag in LDAP --- app/controllers/admin/UsersController.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/controllers/admin/UsersController.php b/app/controllers/admin/UsersController.php index 2551d8616c..710d99322a 100755 --- a/app/controllers/admin/UsersController.php +++ b/app/controllers/admin/UsersController.php @@ -1084,6 +1084,7 @@ class UsersController extends AdminController { $ldap_result_last_name = Config::get('ldap.result.last.name'); $ldap_result_first_name = Config::get('ldap.result.first.name'); $ldap_result_email = Config::get('ldap.result.email'); + $ldap_result_active_flag = Config::get('ldap.result.active.flag'); $ldapconn = ldap_connect($url) or die("Could not connect to LDAP server."); @@ -1098,7 +1099,7 @@ class UsersController extends AdminController { $summary = array(); for ($i = 0; $i < $results["count"]; $i++) { - if ($results[$i]["pyactive"][0] == "TRUE") { + if ($results[$i][$ldap_result_active_flag][0] == "TRUE") { $item = array(); $item["username"] = isset( $results[$i][$ldap_result_username][0] ) ? $results[$i][$ldap_result_username][0] : "";