From 5c66334017e4baaf9dae9a488610702930ddc2da Mon Sep 17 00:00:00 2001 From: Joakim Bergros Date: Tue, 25 Feb 2025 14:22:22 +0100 Subject: [PATCH] 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. --- app/Console/Commands/LdapSync.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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'; }