aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorFrédéric Fortier <frederic.fortier@oronospolytechnique.com>2015-08-07 08:56:28 -0400
committerFrédéric Fortier <frederic.fortier@oronospolytechnique.com>2015-08-07 08:59:12 -0400
commita55f233e9ffac7d492733f50a37343b4243898bf (patch)
treecac71da58e597849725630a8a78d4eb8fdbf787d
parente0469d001384eb9c4125ca16d9babdf673be57ee (diff)
downloadnextcloud-server-a55f233e9ffac7d492733f50a37343b4243898bf.tar.gz
nextcloud-server-a55f233e9ffac7d492733f50a37343b4243898bf.zip
fix more review comments for #18042 / #17759
-rw-r--r--apps/user_ldap/group_ldap.php7
1 files changed, 3 insertions, 4 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php
index a592913c8f5..3b47eb56b03 100644
--- a/apps/user_ldap/group_ldap.php
+++ b/apps/user_ldap/group_ldap.php
@@ -201,9 +201,9 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
}
$groups = $this->access->groupsMatchFilter($groups);
$allGroups = $groups;
- foreach ($groups as $group) {
- $nestedGroups = $this->access->connection->ldapNestedGroups;
- if (!empty($nestedGroups)) {
+ $nestedGroups = $this->access->connection->ldapNestedGroups;
+ if (intval($nestedGroups) === 1) {
+ foreach ($groups as $group) {
$subGroups = $this->_getGroupDNsFromMemberOf($group, $seen);
$allGroups = array_merge($allGroups, $subGroups);
}
@@ -408,7 +408,6 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
&& intval($this->access->connection->useMemberOfToDetectMembership) === 1
) {
$groupDNs = $this->_getGroupDNsFromMemberOf($userDN);
-
if (is_array($groupDNs)) {
foreach ($groupDNs as $dn) {
$groups[] = $this->access->dn2groupname($dn);