Fixed function ldapsearch
Former-commit-id: 36678038a878673a3aae86ed014ee189775829db
This commit is contained in:
parent
8160983e36
commit
de3934ddb8
|
@ -1369,7 +1369,10 @@ function local_ldap_search($ldap_host, $ldap_port=389, $ldap_version=3, $dn, $ac
|
||||||
$tls = ' -ZZ ';
|
$tls = ' -ZZ ';
|
||||||
}
|
}
|
||||||
|
|
||||||
if (stripos($ldap_host, 'ldap') !== false) {
|
if (stripos($ldap_host, 'ldap://') !== false
|
||||||
|
|| stripos($ldap_host, 'ldaps://') !== false
|
||||||
|
|| stripos($ldap_host, 'ldapi://') !== false
|
||||||
|
) {
|
||||||
$ldap_host = ' -H '.$ldap_host.':'.$ldap_port;
|
$ldap_host = ' -H '.$ldap_host.':'.$ldap_port;
|
||||||
} else {
|
} else {
|
||||||
$ldap_host = ' -h '.$ldap_host.' -p '.$ldap_port;
|
$ldap_host = ' -h '.$ldap_host.' -p '.$ldap_port;
|
||||||
|
|
Loading…
Reference in New Issue