aboutsummaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/lib
diff options
context:
space:
mode:
Diffstat (limited to 'apps/user_ldap/lib')
-rw-r--r--apps/user_ldap/lib/Group_LDAP.php9
1 files changed, 7 insertions, 2 deletions
diff --git a/apps/user_ldap/lib/Group_LDAP.php b/apps/user_ldap/lib/Group_LDAP.php
index 3962b064fde..a7a22ff46d9 100644
--- a/apps/user_ldap/lib/Group_LDAP.php
+++ b/apps/user_ldap/lib/Group_LDAP.php
@@ -294,8 +294,13 @@ class Group_LDAP extends BackendUtility implements GroupInterface, IGroupLDAP, I
if ((int)$this->access->connection->ldapNestedGroups === 1) {
while ($recordDn = array_shift($members)) {
$nestedMembers = $this->_groupMembers($recordDn, $seen);
- $members = array_merge($members, $nestedMembers);
- $allMembers[] = $recordDn;
+ if (!empty($nestedMembers)) {
+ // Group, queue its members for processing
+ $members = array_merge($members, $nestedMembers);
+ } else {
+ // User (or empty group, or previously seen group), add it to the member list
+ $allMembers[] = $recordDn;
+ }
}
} else {
$allMembers = $members;