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 866f0a9 commit c62a022Copy full SHA for c62a022
app/Console/Commands/LdapSync.php
@@ -392,11 +392,7 @@ public function handle()
392
}
393
394
//updates assets location based on user's location
395
- $assets = Asset::where('assigned_to', '=', $user->id)->get();
396
- foreach($assets as $asset){
397
- $asset->location_id = $user->location_id;
398
- $asset->save();
399
- }
+ Asset::where('assigned_to', '=', $user->id)->update(['location_id' => $user->location_id]);
400
401
$user->ldap_import = 1;
402
0 commit comments