diff --git a/app/Models/Loggable.php b/app/Models/Loggable.php index ea374dd4868c..612e4f65cd0c 100644 --- a/app/Models/Loggable.php +++ b/app/Models/Loggable.php @@ -41,8 +41,9 @@ public function logCheckout($note, $target /* What are we checking out to? */) $settings = Setting::getSettings(); $log = new Actionlog; $log = $this->determineLogItemType($log); - if(Auth::user()) + if (Auth::user()) { $log->user_id = Auth::user()->id; + } if (!isset($target)) { throw new \Exception('All checkout logs require a target.'); @@ -144,9 +145,11 @@ public function logCheckin($target, $note) $log->location_id = null; $log->note = $note; - if(Auth::user()) - $log->user_id = Auth::user()->id; + if (Auth::user()) { + $log->user_id = Auth::user()->id; + } + $log->logaction('checkin from'); $params = [