Fixing group handling

added back the cache processing and fixed
This commit is contained in:
alexweirig 2016-03-21 08:06:38 +01:00 committed by Vincent Petry
parent 6d74ef71b5
commit c342dcbcee
No known key found for this signature in database
GPG Key ID: AF8F9EFC56562186
1 changed files with 14 additions and 5 deletions

View File

@ -530,6 +530,15 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface {
$uid = $userDN;
}
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);
}
if($primaryGroup !== false) {
$groups[] = $primaryGroup;
}