diff options
author | Robin Appelman <icewind@owncloud.com> | 2014-02-14 17:25:45 +0400 |
---|---|---|
committer | Simon Vocella <voxsim@gmail.com> | 2014-09-24 11:22:43 +0400 |
commit | ed6588ff21e99dceb40173ff1e7318bff62f16e5 (patch) | |
tree | 14d1c72f7798b1f7950513c9ae9aad245f2874e2 /lib | |
parent | 45489ecce487484b06f408fb74aab80488f342b1 (diff) |
remove duplicate call to groupExists
Diffstat (limited to 'lib')
-rw-r--r-- | lib/private/group/manager.php | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php index f275c0d1137..f69ee636c44 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]; } |