From 0c70f81c0dc62dbde062bee379c36c08127355e0 Mon Sep 17 00:00:00 2001 From: paca70 Date: Mon, 4 Aug 2003 19:34:32 +0000 Subject: [PATCH] To fix authentication issue when same ldap-attribute is used multiple fields in Moodle. --- auth/ldap/lib.php | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/auth/ldap/lib.php b/auth/ldap/lib.php index 6be26d6307..85e6b2582f 100644 --- a/auth/ldap/lib.php +++ b/auth/ldap/lib.php @@ -79,7 +79,9 @@ function auth_get_userinfo($username){ $search_attribs = array(); foreach ($attrmap as $key=>$value) { - array_push($search_attribs, $value); + if (!in_array($value, $search_attribs) { + array_push($search_attribs, $value); + } } $user_dn = auth_ldap_find_userdn($ldap_connection, $username); -- 2.39.5