summaryrefslogtreecommitdiffstats
path: root/lib/private
diff options
context:
space:
mode:
authorRobin Appelman <icewind@owncloud.com>2014-02-14 14:25:45 +0100
committerRobin Appelman <icewind@owncloud.com>2014-02-14 14:25:45 +0100
commit0ba0596341779100db37e25e59ac34f5a57bd2c3 (patch)
treefc0e8b98c3b0e383c3dce916338aa6c8beeb24e6 /lib/private
parent4b603cd2f893da633519079bf9fa83e8fe625931 (diff)
downloadnextcloud-server-0ba0596341779100db37e25e59ac34f5a57bd2c3.tar.gz
nextcloud-server-0ba0596341779100db37e25e59ac34f5a57bd2c3.zip
remove duplicate call to groupExists
Diffstat (limited to 'lib/private')
-rw-r--r--lib/private/group/manager.php10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index bf469d51d12..29453c5da14 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -76,12 +76,7 @@ class Manager extends PublicEmitter {
if (isset($this->cachedGroups[$gid])) {
return $this->cachedGroups[$gid];
}
- foreach ($this->backends as $backend) {
- if ($backend->groupExists($gid)) {
- return $this->getGroupObject($gid);
- }
- }
- return null;
+ return $this->getGroupObject($gid);
}
protected function getGroupObject($gid) {
@@ -91,6 +86,9 @@ class Manager extends PublicEmitter {
$backends[] = $backend;
}
}
+ if (count($backends) === 0) {
+ return null;
+ }
$this->cachedGroups[$gid] = new Group($gid, $backends, $this->userManager, $this);
return $this->cachedGroups[$gid];
}