We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent c07ef4d commit fc091c1Copy full SHA for fc091c1
app/Console/Commands/LdapSync.php
@@ -55,6 +55,8 @@ public function handle()
55
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
56
ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
57
58
+
59
+ // Map the LDAP attributes to the Snipe-IT user fields.
60
$ldap_map = [
61
"username" => Setting::getSettings()->ldap_username_field,
62
"last_name" => Setting::getSettings()->ldap_lname_field,
@@ -240,6 +242,7 @@ public function handle()
240
242
}
241
243
244
245
+ // Assign the mapped LDAP attributes for each user to the Snipe-IT user fields
246
for ($i = 0; $i < $results['count']; $i++) {
247
$item = [];
248
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';
0 commit comments