Fix bug where get_user_groups() returned an array with max. one group (#4111)
This commit is contained in:
parent
c9622696a1
commit
fd7440bfc5
1 changed files with 3 additions and 4 deletions
|
@ -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;
|
||||
|
|
Loading…
Add table
Reference in a new issue