From f501787d8ec08b6ebd8b6bd4e1809063603f5411 Mon Sep 17 00:00:00 2001 From: Michael Joseph Date: Thu, 9 Jan 2003 14:09:50 +0000 Subject: [PATCH] fixed dn retrieval --- lib/class.AuthLdap.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/lib/class.AuthLdap.php b/lib/class.AuthLdap.php index 2bde10d..899da93 100644 --- a/lib/class.AuthLdap.php +++ b/lib/class.AuthLdap.php @@ -375,9 +375,12 @@ class AuthLdap { // Modify these as you see fit. $uname = $info[$i]["uid"][0]; // add to the array for each attribute in my list - // add to the array for each attribute in my list for ( $j = 0; $j < count( $attributeArray); $j++) { - $userslist["$uname"]["$attributeArray[$j]"] = $info[$i][strtolower($attributeArray[$j])][0]; + if (strtolower($attributeArray[$j]) == "dn") { + $userslist["$uname"]["$attributeArray[$j]"] = $info[$i][strtolower($attributeArray[$j])]; + } else { + $userslist["$uname"]["$attributeArray[$j]"] = $info[$i][strtolower($attributeArray[$j])][0]; + } } } -- libgit2 0.21.4