summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAleksander Machniak <machniak@kolabsys.com>2014-12-16 08:51:06 (GMT)
committerAleksander Machniak <machniak@kolabsys.com>2014-12-16 08:51:06 (GMT)
commitfd7440bfc57c48d47c44aa6668b5e1a665e90ec9 (patch)
tree5e00c457407de5b3bf32c244d734a4a1b53678ae
parentc9622696a1048e645c273fb73c8ee27a609157c1 (diff)
downloadroundcubemail-plugins-kolab-fd7440bfc57c48d47c44aa6668b5e1a665e90ec9.tar.gz
Fix bug where get_user_groups() returned an array with max. one group (#4111)
-rw-r--r--plugins/kolab_auth/kolab_auth_ldap.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/plugins/kolab_auth/kolab_auth_ldap.php b/plugins/kolab_auth/kolab_auth_ldap.php
index 81af79b..431133b 100644
--- a/plugins/kolab_auth/kolab_auth_ldap.php
+++ b/plugins/kolab_auth/kolab_auth_ldap.php
@@ -155,11 +155,10 @@ class kolab_auth_ldap extends rcube_ldap_generic
$groups = array();
foreach ($result as $entry) {
+ $dn = $entry['dn'];
$entry = rcube_ldap_generic::normalize_entry($entry);
- if (!$entry['dn']) {
- $entry['dn'] = key($result->entries(true));
- }
- $groups[$entry['dn']] = $entry[$name_attr];
+
+ $groups[$dn] = $entry[$name_attr];
}
return $groups;