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.

This commit is contained in:
Joakim Bergros 2025-02-25 14:22:22 +01:00
parent ae82051b73
commit 5c66334017

View file

@ -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';
}