Parameter changes deprecated in LDAP
Former-commit-id: 2accf38ffe089c19475b1956cf04da7769dca2e9
This commit is contained in:
parent
e6abb61a13
commit
63d589c918
|
@ -1369,8 +1369,7 @@ function local_ldap_search($ldap_host, $ldap_port=389, $ldap_version=3, $dn, $ac
|
|||
$tls = ' -ZZ ';
|
||||
}
|
||||
|
||||
$ldap_host = ' -h '.$ldap_host;
|
||||
$ldap_port = ' -p '.$ldap_port;
|
||||
$ldap_host = ' -H '.$ldap_host.':'.$ldap_port;
|
||||
$ldap_version = ' -P '.$ldap_version;
|
||||
if (!empty($ldap_admin_user)) {
|
||||
$ldap_admin_user = " -D '".$ldap_admin_user."'";
|
||||
|
@ -1382,7 +1381,7 @@ function local_ldap_search($ldap_host, $ldap_port=389, $ldap_version=3, $dn, $ac
|
|||
|
||||
$dn = " -b '".$dn."'";
|
||||
|
||||
$shell_ldap_search = explode("\n", shell_exec('ldapsearch -LLL -o ldif-wrap=no -x'.$ldap_host.$ldap_port.$ldap_version.' -E pr=10000/noprompt '.$ldap_admin_user.$ldap_admin_pass.$dn.$filter.$tls.' | grep -v "^#\|^$" | sed "s/:\+ /=>/g"'));
|
||||
$shell_ldap_search = explode("\n", shell_exec('ldapsearch -LLL -o ldif-wrap=no -x'.$ldap_host.$ldap_version.' -E pr=10000/noprompt '.$ldap_admin_user.$ldap_admin_pass.$dn.$filter.$tls.' | grep -v "^#\|^$" | sed "s/:\+ /=>/g"'));
|
||||
foreach ($shell_ldap_search as $line) {
|
||||
$values = explode('=>', $line);
|
||||
if (!empty($values[0]) && !empty($values[1])) {
|
||||
|
|
Loading…
Reference in New Issue