mirror of
https://github.com/snipe/snipe-it.git
synced 2025-03-05 20:52:15 -08:00
Fixed #16173: useraccountcontrol
was not included in the ldap query attributes.
`$results` did not include the `useraccountcontrol` and thus rendered the fallback logic void when `active_flag` was blank.
Added a condition to check if `active_flag` is blank and only then add `useraccountcontrol` to the ldap query since it is then a requirement in accordance with "we respect the userAccountControl attribute" text in the `admin/ldap` route.
[`elseif' will become true when `active_flag` is blank](b141945add/app/Console/Commands/LdapSync.php (L364)
)
This commit is contained in:
parent
c3a2e81afd
commit
ae82051b73
|
@ -125,6 +125,10 @@ class LdapSync extends Command
|
|||
*/
|
||||
$attributes = array_values(array_filter($ldap_map));
|
||||
|
||||
if (is_null($ldap_map['active_flag'])) {
|
||||
$attributes[] = 'useraccountcontrol';
|
||||
}
|
||||
|
||||
$results = Ldap::findLdapUsers($search_base, -1, $filter, $attributes);
|
||||
|
||||
} catch (\Exception $e) {
|
||||
|
|
Loading…
Reference in a new issue