Browse Source

throw exception when LDAP Connection was lost

tags/v8.1.0beta2
Arthur Schiwon 9 years ago
parent
commit
b96b0063f6
1 changed files with 4 additions and 0 deletions
  1. 4
    0
      apps/user_ldap/lib/ldap.php

+ 4
- 0
apps/user_ldap/lib/ldap.php View File



namespace OCA\user_ldap\lib; namespace OCA\user_ldap\lib;


use OC\ServerNotAvailableException;

class LDAP implements ILDAPWrapper { class LDAP implements ILDAPWrapper {
protected $curFunc = ''; protected $curFunc = '';
protected $curArgs = array(); protected $curArgs = array();
//for now //for now
} else if ($errorCode === 10) { } else if ($errorCode === 10) {
//referrals, we switch them off, but then there is AD :) //referrals, we switch them off, but then there is AD :)
} else if ($errorCode === -1) {
throw new ServerNotAvailableException('Lost connection to LDAP server.');
} else { } else {
\OCP\Util::writeLog('user_ldap', \OCP\Util::writeLog('user_ldap',
'LDAP error '.$errorMsg.' (' . 'LDAP error '.$errorMsg.' (' .

Loading…
Cancel
Save