Skip to content
Snippets Groups Projects
Commit 300b1131 authored by Alexander Bergolth's avatar Alexander Bergolth
Browse files

replace spaces with tabs

use true instead of 1
parent d10f6e94
No related branches found
No related tags found
No related merge requests found
...@@ -94,8 +94,8 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { ...@@ -94,8 +94,8 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
} }
$allMembers = array(); $allMembers = array();
if (array_key_exists($dnGroup, $seen)) { if (array_key_exists($dnGroup, $seen)) {
// avoid loops // avoid loops
return array(); return array();
} }
// used extensively in cron job, caching makes sense for nested groups // used extensively in cron job, caching makes sense for nested groups
$cacheKey = '_groupMembers'.$dnGroup; $cacheKey = '_groupMembers'.$dnGroup;
...@@ -107,7 +107,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { ...@@ -107,7 +107,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
$this->access->connection->ldapGroupFilter); $this->access->connection->ldapGroupFilter);
if (is_array($members)) { if (is_array($members)) {
foreach ($members as $memberDN) { foreach ($members as $memberDN) {
$allMembers[$memberDN] = 1; $allMembers[$memberDN] = 1;
$nestedGroups = $this->access->connection->ldapNestedGroups; $nestedGroups = $this->access->connection->ldapNestedGroups;
if (!empty($nestedGroups)) { if (!empty($nestedGroups)) {
$subMembers = $this->_groupMembers($memberDN, $seen); $subMembers = $this->_groupMembers($memberDN, $seen);
...@@ -117,7 +117,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { ...@@ -117,7 +117,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
} }
} }
} }
$this->access->connection->writeToCache($cacheKey, $allMembers); $this->access->connection->writeToCache($cacheKey, $allMembers);
return $allMembers; return $allMembers;
} }
...@@ -172,7 +172,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { ...@@ -172,7 +172,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
// avoid loops // avoid loops
return array(); return array();
} }
$seen[$dn] = 1; $seen[$dn] = true;
$filter = $this->access->combineFilterWithAnd(array( $filter = $this->access->combineFilterWithAnd(array(
$this->access->connection->ldapGroupFilter, $this->access->connection->ldapGroupFilter,
$this->access->connection->ldapGroupMemberAssocAttr.'='.$dn $this->access->connection->ldapGroupMemberAssocAttr.'='.$dn
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment