summaryrefslogtreecommitdiffstats
path: root/lib/group
diff options
context:
space:
mode:
Diffstat (limited to 'lib/group')
-rw-r--r--lib/group/group.php2
-rw-r--r--lib/group/manager.php8
2 files changed, 8 insertions, 2 deletions
diff --git a/lib/group/group.php b/lib/group/group.php
index d4036b4361b..7a639313247 100644
--- a/lib/group/group.php
+++ b/lib/group/group.php
@@ -225,7 +225,7 @@ class Group {
$this->emitter->emit('\OC\Group', 'preDelete', array($this));
}
foreach ($this->backends as $backend) {
- if ($backend->implementsActions(OC_GROUP_BACKEND_DELETE_GROUP) and $backend->groupExists($this->gid)) {
+ if ($backend->implementsActions(OC_GROUP_BACKEND_DELETE_GROUP)) {
$result = true;
$backend->deleteGroup($this->gid);
}
diff --git a/lib/group/manager.php b/lib/group/manager.php
index 7efcff0ade0..bf469d51d12 100644
--- a/lib/group/manager.php
+++ b/lib/group/manager.php
@@ -85,7 +85,13 @@ class Manager extends PublicEmitter {
}
protected function getGroupObject($gid) {
- $this->cachedGroups[$gid] = new Group($gid, $this->backends, $this->userManager, $this);
+ $backends = array();
+ foreach ($this->backends as $backend) {
+ if ($backend->groupExists($gid)) {
+ $backends[] = $backend;
+ }
+ }
+ $this->cachedGroups[$gid] = new Group($gid, $backends, $this->userManager, $this);
return $this->cachedGroups[$gid];
}