mirror of
https://github.com/pandorafms/pandorafms.git
synced 2025-07-31 01:35:36 +02:00
Added ldap adv conf v2
This commit is contained in:
parent
f738fa2fce
commit
89ba75f466
@ -702,10 +702,15 @@ function ldap_process_user_login ($login, $password) {
|
|||||||
$correct = false;
|
$correct = false;
|
||||||
foreach ($ldap_adv_perms as $perm) {
|
foreach ($ldap_adv_perms as $perm) {
|
||||||
$groups = $perm['groups_ldap'];
|
$groups = $perm['groups_ldap'];
|
||||||
$groups = "cn=" . implode(",cn=", $groups);
|
if ($groups[0] == '') {
|
||||||
|
$groups = "";
|
||||||
|
}
|
||||||
|
else {
|
||||||
|
$groups = ",cn=" . str_replace(",", ",cn=", $groups[0]);
|
||||||
|
}
|
||||||
|
|
||||||
if(!empty($ldap_base_dn)) {
|
if(!empty($ldap_base_dn)) {
|
||||||
if (strlen($password) != 0 && @ldap_bind($ds, $ldap_login_attr.io_safe_output($login).",".$groups.$ldap_base_dn, $password) ) {
|
if (strlen($password) != 0 && @ldap_bind($ds, $ldap_login_attr.io_safe_output($login).$groups.$ldap_base_dn, $password) ) {
|
||||||
$correct = true;
|
$correct = true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user