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:22:11 +0200 |
commit | 598f798c048edfdb2841ae0f0452e90de8388d7d (patch) | |
tree | 701f1ba1e1cbfcd712a5218e5f378abcbb2ec4c9 | |
parent | 919241cdda030f173ea1431f6b4745ceaf45eb63 (diff) | |
download | nextcloud-server-598f798c048edfdb2841ae0f0452e90de8388d7d.tar.gz nextcloud-server-598f798c048edfdb2841ae0f0452e90de8388d7d.zip |
throw exception when LDAP Connection was lost
-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 4dad34f5b1e..9d5cf4fee0a 100644 --- a/apps/user_ldap/lib/ldap.php +++ b/apps/user_ldap/lib/ldap.php @@ -23,6 +23,8 @@ namespace OCA\user_ldap\lib; +use OC\ServerNotAvailableException; + class LDAP implements ILDAPWrapper { protected $curFunc = ''; protected $curArgs = array(); @@ -280,6 +282,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.' (' . |