diff options
author | blizzz <blizzz@owncloud.com> | 2014-07-01 14:28:04 +0200 |
---|---|---|
committer | blizzz <blizzz@owncloud.com> | 2014-07-01 14:28:04 +0200 |
commit | 16ce23d19df352cd2653387bf00a0e210016d2f2 (patch) | |
tree | 3ac612bc0daa7a69bb6463698e27c8f72e21a181 | |
parent | 09dea42f7e610ebe656868f309437d3a8271d9a1 (diff) | |
parent | fe0b75ccabd1bd7a79f462920cc1c59b203a86a2 (diff) | |
download | nextcloud-server-16ce23d19df352cd2653387bf00a0e210016d2f2.tar.gz nextcloud-server-16ce23d19df352cd2653387bf00a0e210016d2f2.zip |
Merge pull request #9006 from owncloud/ldap_fix_bgjob
LDAP: fix background job, fixes #8995
-rw-r--r-- | apps/user_ldap/group_ldap.php | 3 | ||||
-rw-r--r-- | apps/user_ldap/lib/jobs.php | 8 |
2 files changed, 8 insertions, 3 deletions
diff --git a/apps/user_ldap/group_ldap.php b/apps/user_ldap/group_ldap.php index 4051b1d8cae..1a35691be85 100644 --- a/apps/user_ldap/group_ldap.php +++ b/apps/user_ldap/group_ldap.php @@ -469,8 +469,7 @@ class GROUP_LDAP extends BackendUtility implements \OCP\GroupInterface { } //if group really still exists, we will be able to read its objectclass - $objcs = $this->access->readAttribute($dn, 'objectclass'); - if(!$objcs || empty($objcs)) { + if(!is_array($this->access->readAttribute($dn, ''))) { $this->access->connection->writeToCache('groupExists'.$gid, false); return false; } diff --git a/apps/user_ldap/lib/jobs.php b/apps/user_ldap/lib/jobs.php index 19c041e4db4..47e536f8f64 100644 --- a/apps/user_ldap/lib/jobs.php +++ b/apps/user_ldap/lib/jobs.php @@ -160,8 +160,14 @@ class Jobs extends \OC\BackgroundJob\TimedJob { $ldapWrapper = new LDAP(); if(count($configPrefixes) === 1) { //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]); - $ldapAccess = new Access($connector, $ldapWrapper); + $ldapAccess = new Access($connector, $ldapWrapper, $userManager); self::$groupBE = new \OCA\user_ldap\GROUP_LDAP($ldapAccess); } else { self::$groupBE = new \OCA\user_ldap\Group_Proxy($configPrefixes, $ldapWrapper); |