From 4c1e44e7597d37f5e06d49ac57b0590374b365c0 Mon Sep 17 00:00:00 2001 From: Neil Blakey-Milner Date: Tue, 18 Apr 2006 08:57:50 +0000 Subject: [PATCH] If the LDAP entry has multiple values for an attribute, use the first one. Either way, log what we got from the server. --- plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php | 5 +++++ 1 file changed, 5 insertions(+), 0 deletions(-) diff --git a/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php b/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php index 29e89fd..02374e5 100644 --- a/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php +++ b/plugins/ktstandard/ldap/ldapbaseauthenticationprovider.inc.php @@ -535,7 +535,12 @@ class KTLDAPBaseAuthenticator extends Authenticator { $aAttr = $oEntry->attributes(); $aAttr['dn'] = $oEntry->dn(); + global $default; foreach ($aAttr as $k => $v) { + $default->log->info(sprintf("LDAP: For DN %s, attribute %s value is %s", $dn, $k, print_r($v, true))); + if (is_array($v)) { + $v = array_shift($v); + } $aRet[strtolower($k)] = $v; } return $aRet; -- libgit2 0.21.4