diff options
author | Arthur Schiwon <blizzz@owncloud.com> | 2015-04-22 15:22:11 +0200 |
---|---|---|
committer | Arthur Schiwon <blizzz@owncloud.com> | 2015-04-22 15:39:28 +0200 |
commit | b96b0063f6803a7a0b683e3430c5837248c8de89 (patch) | |
tree | 2fb812ddc2dc2121b89f5a058803e15cff3c535a /apps | |
parent | 42d9ba0f83f3e4b1d0eaa4aa60cddc89f239dda7 (diff) | |
download | nextcloud-server-b96b0063f6803a7a0b683e3430c5837248c8de89.tar.gz nextcloud-server-b96b0063f6803a7a0b683e3430c5837248c8de89.zip |
throw exception when LDAP Connection was lost
Diffstat (limited to 'apps')
-rw-r--r-- | apps/user_ldap/lib/ldap.php | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/apps/user_ldap/lib/ldap.php b/apps/user_ldap/lib/ldap.php index b4ca3499f49..74df3dd8ae7 100644 --- a/apps/user_ldap/lib/ldap.php +++ b/apps/user_ldap/lib/ldap.php @@ -26,6 +26,8 @@ namespace OCA\user_ldap\lib; +use OC\ServerNotAvailableException; + class LDAP implements ILDAPWrapper { protected $curFunc = ''; protected $curArgs = array(); @@ -283,6 +285,8 @@ class LDAP implements ILDAPWrapper { //for now } else if ($errorCode === 10) { //referrals, we switch them off, but then there is AD :) + } else if ($errorCode === -1) { + throw new ServerNotAvailableException('Lost connection to LDAP server.'); } else { \OCP\Util::writeLog('user_ldap', 'LDAP error '.$errorMsg.' (' . |