From 40ecd30fba6d29362c455b1f0eef875ff19cd544 Mon Sep 17 00:00:00 2001 From: Arthur Schiwon Date: Tue, 6 Jan 2015 23:28:49 +0100 Subject: inject oc config to User_LDAP --- apps/user_ldap/appinfo/app.php | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'apps/user_ldap/appinfo/app.php') diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 302575c3682..980477bb273 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -27,8 +27,8 @@ OCP\App::registerAdmin('user_ldap', 'settings'); $helper = new \OCA\user_ldap\lib\Helper(); $configPrefixes = $helper->getServerConfigurationPrefixes(true); $ldapWrapper = new OCA\user_ldap\lib\LDAP(); +$ocConfig = \OC::$server->getConfig(); if(count($configPrefixes) === 1) { - $ocConfig = \OC::$server->getConfig(); $userManager = new OCA\user_ldap\lib\user\Manager($ocConfig, new OCA\user_ldap\lib\FilesystemHelper(), new OCA\user_ldap\lib\LogWrapper(), @@ -39,10 +39,12 @@ if(count($configPrefixes) === 1) { $dbc = \OC::$server->getDatabaseConnection(); $ldapAccess->setUserMapper(new OCA\User_LDAP\Mapping\UserMapping($dbc)); $ldapAccess->setGroupMapper(new OCA\User_LDAP\Mapping\GroupMapping($dbc)); - $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess); + $userBackend = new OCA\user_ldap\USER_LDAP($ldapAccess, $ocConfig); $groupBackend = new OCA\user_ldap\GROUP_LDAP($ldapAccess); } else if(count($configPrefixes) > 1) { - $userBackend = new OCA\user_ldap\User_Proxy($configPrefixes, $ldapWrapper); + $userBackend = new OCA\user_ldap\User_Proxy( + $configPrefixes, $ldapWrapper, $ocConfig + ); $groupBackend = new OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper); } -- cgit v1.2.3