Skip to content

A free open source IT asset/license management system

Fixed #16173: `useraccountcontrol` was not included in the ldap query attributes.

Joakim Bergrosae82051b7308
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php
index c7efa967a4..8859935f66 100644
--- a/app/Console/Commands/LdapSync.php
+++ b/app/Console/Commands/LdapSync.php
@@ -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) {