Fix bug where get_user_groups() returned an array with max. one group (#4111)

This commit is contained in:
Aleksander Machniak 2014-12-16 03:51:06 -05:00
parent c9622696a1
commit fd7440bfc5

View file

@ -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;