summaryrefslogtreecommitdiffstats
path: root/apps/user_ldap/appinfo/app.php
diff options
context:
space:
mode:
authorArthur Schiwon <blizzz@owncloud.com>2013-01-24 22:39:05 +0100
committerArthur Schiwon <blizzz@owncloud.com>2013-01-24 22:39:05 +0100
commit2749a14171ee7ce32085cc2d0edbfcd5490d2ca3 (patch)
tree3ee167082c5ba0a34148bc866b942331de7f69bb /apps/user_ldap/appinfo/app.php
parent6bc72569666ac5fc8063a4b6233fb25a8ec94060 (diff)
downloadnextcloud-server-2749a14171ee7ce32085cc2d0edbfcd5490d2ca3.tar.gz
nextcloud-server-2749a14171ee7ce32085cc2d0edbfcd5490d2ca3.zip
LDAP: make it possible to enable/disable server configurations
Diffstat (limited to 'apps/user_ldap/appinfo/app.php')
-rw-r--r--apps/user_ldap/appinfo/app.php10
1 files changed, 6 insertions, 4 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php
index 79cfab58796..dec87684c9e 100644
--- a/apps/user_ldap/appinfo/app.php
+++ b/apps/user_ldap/appinfo/app.php
@@ -23,7 +23,7 @@
OCP\App::registerAdmin('user_ldap', 'settings');
-$configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes();
+$configPrefixes = OCA\user_ldap\lib\Helper::getServerConfigurationPrefixes(true);
if(count($configPrefixes) == 1) {
$connector = new OCA\user_ldap\lib\Connection($configPrefixes[0]);
$userBackend = new OCA\user_ldap\USER_LDAP();
@@ -35,9 +35,11 @@ if(count($configPrefixes) == 1) {
$groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes);
}
-// register user backend
-OC_User::useBackend($userBackend);
-OC_Group::useBackend($groupBackend);
+if(count($configPrefixes) > 0) {
+ // register user backend
+ OC_User::useBackend($userBackend);
+ OC_Group::useBackend($groupBackend);
+}
// add settings page to navigation
$entry = array(