From 6103677a910f6dbb6685019abcaba853611b86ea Mon Sep 17 00:00:00 2001 From: Jarkko Lehtoranta Date: Sun, 16 Jul 2017 13:05:48 +0300 Subject: LDAP: Use imported exception in Connection class Signed-off-by: Jarkko Lehtoranta --- apps/user_ldap/lib/Connection.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/apps/user_ldap/lib/Connection.php b/apps/user_ldap/lib/Connection.php index 799e63f268e..8f80e2905c3 100644 --- a/apps/user_ldap/lib/Connection.php +++ b/apps/user_ldap/lib/Connection.php @@ -543,7 +543,7 @@ class Connection extends LDAPUtility { if($bindStatus === true) { return $bindStatus; } - } catch (\OC\ServerNotAvailableException $e) { + } catch (ServerNotAvailableException $e) { if(trim($this->configuration->ldapBackupHost) === "") { throw $e; } @@ -586,16 +586,16 @@ class Connection extends LDAPUtility { $this->ldapConnectionRes = $this->ldap->connect($host, $port); if(!$this->ldap->setOption($this->ldapConnectionRes, LDAP_OPT_PROTOCOL_VERSION, 3)) { - throw new \OC\ServerNotAvailableException('Could not set required LDAP Protocol version.'); + throw new ServerNotAvailableException('Could not set required LDAP Protocol version.'); } if(!$this->ldap->setOption($this->ldapConnectionRes, LDAP_OPT_REFERRALS, 0)) { - throw new \OC\ServerNotAvailableException('Could not disable LDAP referrals.'); + throw new ServerNotAvailableException('Could not disable LDAP referrals.'); } if($this->configuration->ldapTLS) { if(!$this->ldap->startTls($this->ldapConnectionRes)) { - throw new \OC\ServerNotAvailableException('Start TLS failed, when connecting to LDAP host ' . $host . '.'); + throw new ServerNotAvailableException('Start TLS failed, when connecting to LDAP host ' . $host . '.'); } } -- cgit v1.2.3