mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2025-12-06 01:28:19 +01:00
Update ldap.class.php
This commit is contained in:
committed by
GitHub
parent
890d0b6685
commit
eb7886ecff
@@ -739,8 +739,7 @@ class Ldap
|
|||||||
function serverPing($host, $port=389, $timeout=1)
|
function serverPing($host, $port=389, $timeout=1)
|
||||||
{
|
{
|
||||||
// Replace ldaps:// by ssl://
|
// Replace ldaps:// by ssl://
|
||||||
if (preg_match('/^ldaps/',$host)) {
|
if (preg_match('/^ldaps:\/\/([^\/]+)\/?$/',$host, $regs)) {
|
||||||
preg_match('/^ldaps:\/\/([^\/]+)\/?$/', $host, $regs);
|
|
||||||
$host = 'ssl://'.$regs[1];
|
$host = 'ssl://'.$regs[1];
|
||||||
}
|
}
|
||||||
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
$op = @fsockopen($host, $port, $errno, $errstr, $timeout);
|
||||||
|
|||||||
Reference in New Issue
Block a user