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 05a8d30 commit 866f0a9Copy full SHA for 866f0a9
app/Console/Commands/LdapSync.php
@@ -391,9 +391,11 @@ public function handle()
391
$user->location_id = $location->id;
392
}
393
394
- $assets = Asset::whereColumn('assigned_to', '=', $user->id)->get();
+ //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
400
401
$user->ldap_import = 1;
0 commit comments