Skip to content
Snippets Groups Projects
Commit ede2aa23 authored by macjohnny's avatar macjohnny
Browse files

Update manager.php

add a function getUserGroupIds for retrieving group ids instead of group objects. this significantly improves performance when using many (nested) groups.
parent 5def2a72
No related branches found
No related tags found
No related merge requests found
......@@ -182,6 +182,18 @@ class Manager extends PublicEmitter {
$this->cachedUserGroups[$uid] = array_values($groups);
return $this->cachedUserGroups[$uid];
}
/**
* @param \OC\User\User $user
* @return array with group names
*/
public function getUserGroupIds($user) {
$groupIds = array();
foreach ($this->backends as $backend) {
$groupIds = array_merge($groupIds,$backend->getUserGroups($user->getUID()));
}
return $groupIds;
}
/**
* get a list of all display names in a group
......
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