diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-01-07 00:52:18 +0100 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-01-07 00:52:18 +0100 |
commit | b9235e2a24ada2bf69fc23cd83405661bde7f0da (patch) | |
tree | f73ab7e9ca94e9a0a19d0ddbb9a82a7dc91c16b4 /apps/user_ldap/appinfo | |
parent | 64f0b055e67974141cf2e156d2b062f55768ce7d (diff) | |
download | nextcloud-server-b9235e2a24ada2bf69fc23cd83405661bde7f0da.tar.gz nextcloud-server-b9235e2a24ada2bf69fc23cd83405661bde7f0da.zip |
inject DB Connection to user manager
Diffstat (limited to 'apps/user_ldap/appinfo')
-rw-r--r-- | apps/user_ldap/appinfo/app.php | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/apps/user_ldap/appinfo/app.php b/apps/user_ldap/appinfo/app.php index 980477bb273..911688a5c20 100644 --- a/apps/user_ldap/appinfo/app.php +++ b/apps/user_ldap/appinfo/app.php @@ -29,14 +29,17 @@ $configPrefixes = $helper->getServerConfigurationPrefixes(true); $ldapWrapper = new OCA\user_ldap\lib\LDAP(); $ocConfig = \OC::$server->getConfig(); if(count($configPrefixes) === 1) { + $dbc = \OC::$server->getDatabaseConnection(); $userManager = new OCA\user_ldap\lib\user\Manager($ocConfig, new OCA\user_ldap\lib\FilesystemHelper(), new OCA\user_ldap\lib\LogWrapper(), \OC::$server->getAvatarManager(), - new \OCP\Image()); + new \OCP\Image(), + $dbc + ); $connector = new OCA\user_ldap\lib\Connection($ldapWrapper, $configPrefixes[0]); $ldapAccess = new OCA\user_ldap\lib\Access($connector, $ldapWrapper, $userManager); - $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, $ocConfig); |