mirror of
https://gitlab.com/davical-project/davical.git
synced 2026-01-27 00:33:34 +00:00
Log better information about the connection to the server
This commit is contained in:
parent
30b05549d0
commit
15e5a89675
@ -65,16 +65,23 @@ class ldapDriver
|
||||
$this->connect=ldap_connect($host);
|
||||
|
||||
if (! $this->connect){
|
||||
if (isset($config['uri']))
|
||||
if (isset($config['uri'])) {
|
||||
$c->messages[] = sprintf(translate( 'drivers_ldap : Unable to connect to LDAP with URI: %s'), $config['uri'] );
|
||||
else
|
||||
} else {
|
||||
if (! $port) $port = 'default';
|
||||
$c->messages[] = sprintf(translate( 'drivers_ldap : Unable to connect to LDAP with port %s on host %s'), $port, $host );
|
||||
}
|
||||
$this->valid=false;
|
||||
return ;
|
||||
} else {
|
||||
if (isset($config['uri']))
|
||||
dbg_error_log( "LDAP", "drivers_ldap : Connected to LDAP server %s", $config['uri'] );
|
||||
elseif ($port)
|
||||
dbg_error_log( "LDAP", "drivers_ldap : Connected to LDAP server %s, port %s", $host, $port );
|
||||
else
|
||||
dbg_error_log( "LDAP", "drivers_ldap : Connected to LDAP server %s", $host );
|
||||
}
|
||||
|
||||
dbg_error_log( "LDAP", "drivers_ldap : Connected to LDAP server %s",$host );
|
||||
|
||||
// Start TLS if desired (requires protocol version 3)
|
||||
if (isset($config['startTLS'])) {
|
||||
if (!ldap_set_option($this->connect, LDAP_OPT_PROTOCOL_VERSION, 3)) {
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user