Fixing group handling
added back the cache processing and fixed
This commit is contained in:
parent
6d74ef71b5
commit
c342dcbcee
|
@ -530,12 +530,21 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
|
|||
$uid = $userDN;
|
||||
}
|
||||
|
||||
if($primaryGroup !== false) {
|
||||
$groups[] = $primaryGroup;
|
||||
}
|
||||
if(isset($this->cachedGroupsByMember[$uid])) {
|
||||
$groups[] = $this->cachedGroupsByMember[$uid];
|
||||
} else {
|
||||
$groupsByMember = array_values($this->getGroupsByMember($uid));
|
||||
$groupsByMember = $this->access->ownCloudGroupNames($groupsByMember);
|
||||
$this->cachedGroupsByMember[$uid] = $groupsByMember;
|
||||
$groups = array_merge($groups, $groupsByMember);
|
||||
}
|
||||
|
||||
$groups = array_unique($groups, SORT_LOCALE_STRING);
|
||||
$this->access->connection->writeToCache($cacheKey, $groups);
|
||||
if($primaryGroup !== false) {
|
||||
$groups[] = $primaryGroup;
|
||||
}
|
||||
|
||||
$groups = array_unique($groups, SORT_LOCALE_STRING);
|
||||
$this->access->connection->writeToCache($cacheKey, $groups);
|
||||
|
||||
return $groups;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue