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/lib/jobs.php | |
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/lib/jobs.php')
-rw-r--r-- | apps/user_ldap/lib/jobs.php | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/apps/user_ldap/lib/jobs.php b/apps/user_ldap/lib/jobs.php index e8e6df0b9d0..a887b65251c 100644 --- a/apps/user_ldap/lib/jobs.php +++ b/apps/user_ldap/lib/jobs.php @@ -164,16 +164,18 @@ class Jobs extends \OC\BackgroundJob\TimedJob { $ldapWrapper = new LDAP(); if(count($configPrefixes) === 1) { //avoid the proxy when there is only one LDAP server configured + $dbc = \OC::$server->getDatabaseConnection(); $userManager = new user\Manager( \OC::$server->getConfig(), new FilesystemHelper(), new LogWrapper(), \OC::$server->getAvatarManager(), - new \OCP\Image()); + new \OCP\Image(), + $dbc); $connector = new Connection($ldapWrapper, $configPrefixes[0]); $ldapAccess = new Access($connector, $ldapWrapper, $userManager); - $groupMapper = new GroupMapping(\OC::$server->getDatabaseConnection()); - $userMapper = new UserMapping(\OC::$server->getDatabaseConnection()); + $groupMapper = new GroupMapping($dbc); + $userMapper = new UserMapping($dbc); $ldapAccess->setGroupMapper($groupMapper); $ldapAccess->setUserMapper($userMapper); self::$groupBE = new \OCA\user_ldap\GROUP_LDAP($ldapAccess); |