Skip to content

Commit fc091c1

Browse files
committed
Added comments
Signed-off-by: snipe <[email protected]>
1 parent c07ef4d commit fc091c1

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

app/Console/Commands/LdapSync.php

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ public function handle()
5555
ini_set('max_execution_time', env('LDAP_TIME_LIM', 600)); //600 seconds = 10 minutes
5656
ini_set('memory_limit', env('LDAP_MEM_LIM', '500M'));
5757

58+
59+
// Map the LDAP attributes to the Snipe-IT user fields.
5860
$ldap_map = [
5961
"username" => Setting::getSettings()->ldap_username_field,
6062
"last_name" => Setting::getSettings()->ldap_lname_field,
@@ -240,6 +242,7 @@ public function handle()
240242
}
241243

242244

245+
// Assign the mapped LDAP attributes for each user to the Snipe-IT user fields
243246
for ($i = 0; $i < $results['count']; $i++) {
244247
$item = [];
245248
$item['username'] = $results[$i][$ldap_map["username"]][0] ?? '';

0 commit comments

Comments
 (0)