diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-01-06 23:28:49 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-01-06 23:28:49 +0100 |
commit | 40ecd30fba6d29362c455b1f0eef875ff19cd544 (patch) | |
tree | c221a9cec19d42588338c308333fc84ef3d84e91 /apps/user_ldap/appinfo/app.php | |
parent | 8e488f726c6f6aaaf1b33c6bc53f7ecb417b0d28 (diff) | |
download | nextcloud-server-40ecd30fba6d29362c455b1f0eef875ff19cd544.tar.gz nextcloud-server-40ecd30fba6d29362c455b1f0eef875ff19cd544.zip |
inject oc config to User_LDAP
Diffstat (limited to 'apps/user_ldap/appinfo/app.php')
-rw-r--r-- | apps/user_ldap/appinfo/app.php | 8 |
1 files changed, 5 insertions, 3 deletions
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); } |