Make LDAP connection error fatal - there really is no way to recover from that.

This commit is contained in:
Craig Andrews
2010-02-24 23:20:34 -05:00
parent beb776cfd6
commit 489bd935eb
2 changed files with 5 additions and 3 deletions

View File

@@ -199,8 +199,7 @@ class LdapAuthenticationPlugin extends AuthenticationPlugin
$ldap->setErrorHandling(PEAR_ERROR_RETURN);
$err=$ldap->bind();
if (Net_LDAP2::isError($err)) {
common_log(LOG_WARNING, 'Could not connect to LDAP server: '.$err->getMessage());
return false;
throw new Exception('Could not connect to LDAP server: '.$err->getMessage());
}
if($config == null) $this->default_ldap=$ldap;