summaryrefslogtreecommitdiffstats
path: root/lib/private/group/manager.php
diff options
context:
space:
mode:
Diffstat (limited to 'lib/private/group/manager.php')
-rw-r--r--lib/private/group/manager.php17
1 files changed, 14 insertions, 3 deletions
diff --git a/lib/private/group/manager.php b/lib/private/group/manager.php
index 6399f16f9c8..70263fc2afa 100644
--- a/lib/private/group/manager.php
+++ b/lib/private/group/manager.php
@@ -98,10 +98,21 @@ class Manager extends PublicEmitter implements IGroupManager {
}
/**
- * @return \OC_Group_Backend[] Get registered backends
+ * Checks whether a given backend is used
+ *
+ * @param string $backendClass Full classname including complete namespace
+ * @return bool
*/
- public function getBackends() {
- return $this->backends;
+ public function isBackendUsed($backendClass) {
+ $backendClass = strtolower(ltrim($backendClass, '\\'));
+
+ foreach ($this->backends as $backend) {
+ if (strtolower(get_class($backend)) === $backendClass) {
+ return true;
+ }
+ }
+
+ return false;
}
/**