mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-02-20 13:46:52 +01:00
Refactored connect_bind return
This commit is contained in:
parent
83614778e5
commit
e1335db9c1
|
|
@ -338,7 +338,7 @@ class Ldap
|
|||
if (!function_exists("ldap_connect")) {
|
||||
$this->error = 'LDAPFunctionsNotAvailableOnPHP';
|
||||
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||
$return = -1;
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (empty($this->error)) {
|
||||
|
|
@ -443,15 +443,13 @@ class Ldap
|
|||
}
|
||||
|
||||
if ($connected) {
|
||||
$return = $connected;
|
||||
dol_syslog(get_class($this)."::connect_bind return=".$return, LOG_DEBUG);
|
||||
dol_syslog(get_class($this)."::connect_bind ".$connected, LOG_DEBUG);
|
||||
return $connected;
|
||||
} else {
|
||||
$this->error = 'Failed to connect to LDAP'.($this->error ? ': '.$this->error : '');
|
||||
$return = -1;
|
||||
dol_syslog(get_class($this)."::connect_bind return=".$return.' - '.$this->error, LOG_WARNING);
|
||||
dol_syslog(get_class($this)."::connect_bind ".$this->error, LOG_WARNING);
|
||||
return -1;
|
||||
}
|
||||
|
||||
return $return;
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user