diff --git a/app/Http/Controllers/Api/AccessoriesController.php b/app/Http/Controllers/Api/AccessoriesController.php index f27d48c7c8..edbf90d15c 100644 --- a/app/Http/Controllers/Api/AccessoriesController.php +++ b/app/Http/Controllers/Api/AccessoriesController.php @@ -287,7 +287,7 @@ class AccessoriesController extends Controller $accessory = Accessory::find($accessory_user->accessory_id); $this->authorize('checkin', $accessory); - $logaction = $accessory->logCheckin(User::find($accessoryUserId), $request->input('note')); + $logaction = $accessory->logCheckin(User::find($accessory_user->user_id), $request->input('note')); // Was the accessory updated? if (DB::table('accessories_users')->where('id', '=', $accessory_user->id)->delete()) {