A free open source IT asset/license management system
Added some hepful comments
snipe3a0f738fb0c3
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.phpindex 4ec7509d15..9e965a7080 100755--- a/app/Console/Commands/LdapSync.php+++ b/app/Console/Commands/LdapSync.php@@ -162,11 +162,15 @@ class LdapSync extends Command$item["ldap_location_override"] = isset($results[$i]["ldap_location_override"]) ? $results[$i]["ldap_location_override"]:"";$item["location_id"] = isset($results[$i]["location_id"]) ? $results[$i]["location_id"]:"";++ // This is active directory, not regular LDAPif ( array_key_exists('useraccountcontrol', $results[$i]) ) {$enabled_accounts = ['512', '544', '66048', '66080', '262656', '262688', '328192', '328224'];$item['activated'] = ( in_array($results[$i]['useraccountcontrol'][0], $enabled_accounts) ) ? 1 : 0;++ // Fall through to LDAP} else {$item['activated'] = 0;}