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
1 changed files with 4 additions and 1 deletions
|
@ -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…
Add table
Reference in a new issue