From: paca70 Date: Mon, 4 Aug 2003 19:34:32 +0000 (+0000) Subject: To fix authentication issue when same ldap-attribute is used multiple fields in Moodle. X-Git-Url: http://git.mjollnir.org/gw?a=commitdiff_plain;h=0c70f81c0dc62dbde062bee379c36c08127355e0;p=moodle.git To fix authentication issue when same ldap-attribute is used multiple fields in Moodle. --- 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);