summaryrefslogtreecommitdiffstats
path: root/lib/private/group
diff options
context:
space:
mode:
authorJoas Schilling <nickvergessen@owncloud.com>2015-06-16 11:31:04 +0200
committerJoas Schilling <nickvergessen@owncloud.com>2015-06-16 11:31:04 +0200
commit497fe93b6c0a7de212e69ec8a343867cb4904dca (patch)
tree07a4f08a520ee95bc69f3311cef90342195d36d9 /lib/private/group
parent171f86ca2e71918809930e823062d93c03833921 (diff)
downloadnextcloud-server-497fe93b6c0a7de212e69ec8a343867cb4904dca.tar.gz
nextcloud-server-497fe93b6c0a7de212e69ec8a343867cb4904dca.zip
Do not return backends but add a method to check for one
Diffstat (limited to 'lib/private/group')
-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;
}
/**