Revision c48e3d87
Added by Christopher Cope over 1 year ago
src/etc/inc/auth.inc | ||
---|---|---|
1557 | 1557 |
log_error(sprintf(gettext("LDAP Debug: LDAP connection error flag: %s"), var_export($error, true))); |
1558 | 1558 |
} |
1559 | 1559 |
|
1560 |
if ($error == true) { |
|
1561 |
$errormsg = sprintf(gettext("ERROR! Could not connect to server %s."), $ldapname); |
|
1562 |
$attributes['error_message'] = gettext("Error : could not connect to authentication server."); |
|
1563 |
return null; |
|
1564 |
} |
|
1565 |
|
|
1560 | 1566 |
/* Setup CA environment if needed. */ |
1561 | 1567 |
ldap_setup_caenv($ldap, $authcfg); |
1562 | 1568 |
|
... | ... | |
1575 | 1581 |
} |
1576 | 1582 |
} |
1577 | 1583 |
|
1578 |
if ($error == true) { |
|
1579 |
$errormsg = sprintf(gettext("ERROR! Could not connect to server %s."), $ldapname); |
|
1580 |
$attributes['error_message'] = gettext("Error : could not connect to authentication server."); |
|
1581 |
return null; |
|
1582 |
} |
|
1583 |
|
|
1584 | 1584 |
/* ok, its up. now, lets bind as the bind user so we can search it */ |
1585 | 1585 |
$error = false; |
1586 | 1586 |
$ldapbindun = isset($authcfg['ldap_utf8']) ? utf8_encode($ldapbindun) : $ldapbindun; |
Also available in: Unified diff
Bail earlier if the LDAP connection fails. Fix #15122