user Group->users as assosiative array

This commit is contained in:
Robin Appelman 2013-12-11 16:25:41 +01:00
parent b126374780
commit 3d29992378
1 changed files with 3 additions and 5 deletions

View File

@ -90,14 +90,12 @@ class Group {
* @return bool
*/
public function inGroup($user) {
foreach ($this->users as $cachedUser) {
if ($user->getUID() === $cachedUser->getUID()) {
return true;
}
if (isset($this->users[$user->getUID()])) {
return true;
}
foreach ($this->backends as $backend) {
if ($backend->inGroup($user->getUID(), $this->gid)) {
$this->users[] = $user;
$this->users[$user->getUID()] = $user;
return true;
}
}