plugins/kolab_auth

Aleksander Machniak machniak at kolabsys.com
Thu Jan 16 14:06:38 CET 2014


 plugins/kolab_auth/kolab_auth_ldap.php |    7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

New commits:
commit fa6fe28b3cc575087b5f8ab3ced04e1b1989dd00
Author: Aleksander Machniak <machniak at kolabsys.com>
Date:   Thu Jan 16 14:06:00 2014 +0100

    Allow mixed-case in LDAP attribute names in fieldmap (Bug #2776)

diff --git a/plugins/kolab_auth/kolab_auth_ldap.php b/plugins/kolab_auth/kolab_auth_ldap.php
index 2f2ca14..ddf7cff 100644
--- a/plugins/kolab_auth/kolab_auth_ldap.php
+++ b/plugins/kolab_auth/kolab_auth_ldap.php
@@ -329,9 +329,12 @@ class kolab_auth_ldap extends rcube_ldap_generic
 
         // fields mapping
         foreach ($this->fieldmap as $field => $attr) {
-            if (isset($entry[$attr])) {
-                $entry[$field] = $entry[$attr];
+            // $entry is indexed by lower-case attribute names
+            $attr_lc = strtolower($attr);
+            if (isset($entry[$attr_lc])) {
+                $entry[$field] = $entry[$attr_lc];
             }
+            // @TODO: consider returning also $entry[$attr] when $attr != $attr_lc
         }
 
         return $entry;




More information about the commits mailing list