From cf2a071ec7f382ad7680324fdaff1216ccca597b Mon Sep 17 00:00:00 2001 From: kkalev Date: Tue, 12 Nov 2002 09:04:12 +0000 Subject: [PATCH] When searching a user in ldap through the find page only try to find the users which have a uid attribute (username) --- Changelog | 1 + lib/ldap/find.php3 | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/Changelog b/Changelog index e842a70..99fde22 100644 --- a/Changelog +++ b/Changelog @@ -8,6 +8,7 @@ Ver 1.61: * Fix a parse error in failed_logins.php3 * Fix a bug in lib/defaults.php3 which did not allow the default.vals file to be used correctly * Include password.php3 in lib/ldap/password_check.php3 +* When searching a user in ldap through the find page only try to find the users which have a uid attribute (username) Ver 1.60: * Use require_once when including lib/functions.php3 in lib/sql * In the buttons toolbar Edit User should not be clickable. diff --git a/lib/ldap/find.php3 b/lib/ldap/find.php3 index 5c6da52..e180918 100644 --- a/lib/ldap/find.php3 +++ b/lib/ldap/find.php3 @@ -9,7 +9,7 @@ if ($ds) { require('../lib/ldap/attrmap.php3'); $attr = $attrmap[$radius_attr]; } - $sr=@ldap_search($ds,"$config[ldap_base]", "$attr=*$search*",array('uid'),0,$max_results); + $sr=@ldap_search($ds,"$config[ldap_base]", "(&($attr=*$search*)(uid=*))",array('uid'),0,$max_results); if (($info = @ldap_get_entries($ds, $sr))){ for ($i = 0; $i < $info["count"]; $i++) $found_users[] = $info[$i]['uid'][0]; -- 2.39.5