fix instantiation of Access class

This commit is contained in:
Arthur Schiwon 2014-06-12 13:32:58 +02:00
parent df7678f01e
commit ef7ab856f6
1 changed files with 7 additions and 1 deletions

View File

@ -160,8 +160,14 @@ class Jobs extends \OC\BackgroundJob\TimedJob {
$ldapWrapper = new LDAP(); $ldapWrapper = new LDAP();
if(count($configPrefixes) === 1) { if(count($configPrefixes) === 1) {
//avoid the proxy when there is only one LDAP server configured //avoid the proxy when there is only one LDAP server configured
$userManager = new user\Manager(
\OC::$server->getConfig(),
new FilesystemHelper(),
new LogWrapper(),
\OC::$server->getAvatarManager(),
new \OCP\Image());
$connector = new Connection($ldapWrapper, $configPrefixes[0]); $connector = new Connection($ldapWrapper, $configPrefixes[0]);
$ldapAccess = new Access($connector, $ldapWrapper); $ldapAccess = new Access($connector, $ldapWrapper, $userManager);
self::$groupBE = new \OCA\user_ldap\GROUP_LDAP($ldapAccess); self::$groupBE = new \OCA\user_ldap\GROUP_LDAP($ldapAccess);
} else { } else {
self::$groupBE = new \OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper); self::$groupBE = new \OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper);