mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Updating LDAP such that each user is not required to be bindable to LDAP (#6571)
* Update Ldap.php * Update Ldap.php * Update Ldap.php * Update Ldap.php * Update Ldap.php Updating LDAP.php such that the admin bind will ONLY occur if the user attempting auth cannot bind. If that is the case, it will attempt to bind as admin and search for that user, prior to failing.
This commit is contained in:
parent
187206cb88
commit
49073742b5
|
@ -96,8 +96,11 @@ class Ldap extends Model
|
|||
|
||||
$filterQuery = $settings->ldap_auth_filter_query . $username;
|
||||
|
||||
|
||||
if (!$ldapbind = @ldap_bind($connection, $userDn, $password)) {
|
||||
return false;
|
||||
if(!$ldapbind = Ldap::bindAdminToLdap($connection)){
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
if (!$results = ldap_search($connection, $baseDn, $filterQuery)) {
|
||||
|
|
Loading…
Reference in a new issue