summaryrefslogtreecommitdiffstats
path: root/lib/private/group/group.php
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2013-12-11 16:25:41 +0100
committerRobin Appelman <icewind@owncloud.com>2013-12-11 16:25:41 +0100
commit3d299923786aa818aafeef1cb4dc3778b6fc1692 (patch)
tree38205fab79b77ab0b7173182cca176b39ef82dc4 /lib/private/group/group.php
parentb126374780c7364da13b89f000e09467732a3cec (diff)
downloadnextcloud-server-3d299923786aa818aafeef1cb4dc3778b6fc1692.tar.gz
nextcloud-server-3d299923786aa818aafeef1cb4dc3778b6fc1692.zip
user Group->users as assosiative array
Diffstat (limited to 'lib/private/group/group.php')
-rw-r--r--lib/private/group/group.php8
1 files changed, 3 insertions, 5 deletions
diff --git a/lib/private/group/group.php b/lib/private/group/group.php
index 694827d100e..97f1cb8d960 100644
--- a/lib/private/group/group.php
+++ b/lib/private/group/group.php
@@ -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;
}
}