Skip to content

A free open source IT asset/license management system

Added a check to see if the user has specified that is an ActiveDirectory server in the configuration before adding the `useraccountcontrol` attribute to the ldap query.

Joakim Bergros5c66334017e4
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.php
index 8859935f66..619c6af793 100644
--- a/app/Console/Commands/LdapSync.php
+++ b/app/Console/Commands/LdapSync.php
@@ -125,7 +125,7 @@ class LdapSync extends Command
*/
$attributes = array_values(array_filter($ldap_map));
- if (is_null($ldap_map['active_flag'])) {
+ if (Setting::getSettings()->is_ad === 1 && is_null($ldap_map['active_flag'])) {
$attributes[] = 'useraccountcontrol';
}