mirror of
https://github.com/lucaspalomodevelop/core.git
synced 2026-03-14 00:24:40 +00:00
Auth/LDAP: minor tweak for https://github.com/opnsense/core/pull/4784, only log message when there is one.
This commit is contained in:
parent
8ec2c22cac
commit
73030fb528
@ -201,7 +201,9 @@ class LDAP extends Base implements IAuthConnector
|
||||
ldap_get_option($this->ldapHandle, LDAP_OPT_ERROR_STRING, $error_string);
|
||||
$error_string = str_replace(array("\n","\r","\t"), ' ', $error_string);
|
||||
syslog(LOG_ERR, sprintf($message . " [%s; %s]", $error_string, ldap_error($this->ldapHandle)));
|
||||
$this->lastAuthErrors['error'] = $error_string;
|
||||
if (!empty($error_string)) {
|
||||
$this->lastAuthErrors['error'] = $error_string;
|
||||
}
|
||||
$this->lastAuthErrors['ldap_error'] = ldap_error($this->ldapHandle);
|
||||
} else {
|
||||
syslog(LOG_ERR, $message);
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user