core/login/ldap: allow anonymous user lookup
This commit is contained in:
parent
97a7450f10
commit
a2b60e52e9
@ -109,9 +109,9 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
|
|||||||
$userSearchFilter = str_replace('%1%', $usertotest, $dolibarr_main_auth_ldap_filter);
|
$userSearchFilter = str_replace('%1%', $usertotest, $dolibarr_main_auth_ldap_filter);
|
||||||
}
|
}
|
||||||
|
|
||||||
// If admin login provided
|
// If admin login or ldap auth filter provided
|
||||||
// Code to get user in LDAP from an admin connection (may differ from user connection, done later)
|
// Code to get user in LDAP from an admin connection (may differ from user connection, done later)
|
||||||
if ($ldapadminlogin) {
|
if ($ldapadminlogin || $dolibarr_main_auth_ldap_filter) {
|
||||||
$result = $ldap->connect_bind();
|
$result = $ldap->connect_bind();
|
||||||
if ($result > 0) {
|
if ($result > 0) {
|
||||||
$resultFetchLdapUser = $ldap->fetch($usertotest, $userSearchFilter);
|
$resultFetchLdapUser = $ldap->fetch($usertotest, $userSearchFilter);
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user