A free open source IT asset/license management system
Added comments
snipefc091c11742d
diff --git a/app/Console/Commands/LdapSync.php b/app/Console/Commands/LdapSync.phpindex f79988e2a3..7ad4648702 100644--- a/app/Console/Commands/LdapSync.php+++ b/app/Console/Commands/LdapSync.php@@ -55,6 +55,8 @@ class LdapSync extends Commandini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutesini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));++ // Map the LDAP attributes to the Snipe-IT user fields.$ldap_map = ["username" => Setting::getSettings()->ldap_username_field,"last_name" => Setting::getSettings()->ldap_lname_field,@@ -240,6 +242,7 @@ class LdapSync extends Command}+ // Assign the mapped LDAP attributes for each user to the Snipe-IT user fieldsfor ($i = 0; $i < $results['count']; $i++) {$item = [];$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';