summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-01-16 13:06:00 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-01-16 13:06:00 (GMT)
commitfa6fe28b3cc575087b5f8ab3ced04e1b1989dd00 (patch)
tree2c250c798fda9318e7dcf8fa0933b1f20f22caa6
parent8996e8fa60ce969417bca9187a8610df5fc4edab (diff)
downloadroundcubemail-plugins-kolab-fa6fe28b3cc575087b5f8ab3ced04e1b1989dd00.tar.gz
Allow mixed-case in LDAP attribute names in fieldmap (Bug #2776)
-rw-r--r--plugins/kolab_auth/kolab_auth_ldap.php7
1 files changed, 5 insertions, 2 deletions
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;