diff options
Diffstat (limited to 'apps/user_ldap/lib/Connection.php')
-rw-r--r-- | apps/user_ldap/lib/Connection.php | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 78a5f93d29e..336179ac341 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -11,8 +11,6 @@ use OC\ServerNotAvailableException; use OCA\User_LDAP\Exceptions\ConfigurationIssueException; use OCP\ICache; use OCP\ICacheFactory; -use OCP\IConfig; -use OCP\IDBConnection; use OCP\IL10N; use OCP\Server; use OCP\Util; @@ -156,7 +154,7 @@ class Connection extends LDAPUtility { if ($memcache->isAvailable()) { $this->cache = $memcache->createDistributed(); } - $helper = new Helper(Server::get(IConfig::class), Server::get(IDBConnection::class)); + $helper = Server::get(Helper::class); $this->doNotValidate = !in_array($this->configPrefix, $helper->getServerConfigurationPrefixes()); $this->logger = Server::get(LoggerInterface::class); @@ -663,8 +661,8 @@ class Connection extends LDAPUtility { $this->doConnect($this->configuration->ldapBackupHost ?? '', $this->configuration->ldapBackupPort ?? ''); $this->bindResult = []; $bindStatus = $this->bind(); - $error = $this->ldap->isResource($this->ldapConnectionRes) ? - $this->ldap->errno($this->ldapConnectionRes) : -1; + $error = $this->ldap->isResource($this->ldapConnectionRes) + ? $this->ldap->errno($this->ldapConnectionRes) : -1; if ($bindStatus && $error === 0 && !$forceBackupHost) { //when bind to backup server succeeded and failed to main server, //skip contacting it for 15min |