From 39929c7d893e51ffc0dbbf6a41168cfc5211b462 Mon Sep 17 00:00:00 2001 From: snipe Date: Tue, 2 Aug 2016 04:23:13 -0700 Subject: [PATCH] Better handling for deleted users --- app/Http/Controllers/UsersController.php | 2 -- config/version.php | 6 +++--- resources/views/hardware/view.blade.php | 18 ++++++++++++------ 3 files changed, 15 insertions(+), 11 deletions(-) diff --git a/app/Http/Controllers/UsersController.php b/app/Http/Controllers/UsersController.php index 478a84784e..6dcc42c8df 100755 --- a/app/Http/Controllers/UsersController.php +++ b/app/Http/Controllers/UsersController.php @@ -1233,9 +1233,7 @@ class UsersController extends Controller $item["note"] = $item["createorupdate"]; $item["status"]='success'; } else { - //$errors_array = array($user->getErrors()); foreach ($user->getErrors()->getMessages() as $key => $err) { - //echo $user->getErrors(); $errors .='
  • '.$err[0]; } $item["note"] = $errors; diff --git a/config/version.php b/config/version.php index f071eb905c..daed147dbf 100644 --- a/config/version.php +++ b/config/version.php @@ -1,5 +1,5 @@ 'v3.1', - 'hash_version' => 'v3.1-95-gde17da0', -); + 'app_version' => 'v3.1.0', + 'hash_version' => 'v3.1.0-29-gd6ba0b6', +); \ No newline at end of file diff --git a/resources/views/hardware/view.blade.php b/resources/views/hardware/view.blade.php index d1f3c17cdd..dde24da01f 100755 --- a/resources/views/hardware/view.blade.php +++ b/resources/views/hardware/view.blade.php @@ -476,22 +476,28 @@ {{ $log->created_at }} - @if (isset($log->user_id)) + @if (isset($log->adminlog)) {{ $log->adminlog->fullName() }} + @else + Deleted Admin @endif {{ $log->action_type }} @if ((isset($log->checkedout_to)) && ($log->checkedout_to!=0) && ($log->checkedout_to!='')) - @if ($log->userlog->deleted_at=='') + @if ($log->userlog) + + @if ($log->userlog->deleted_at=='') {{ $log->userlog->fullName() }} - @else - {{ $log->userlog->fullName() }} - @endif - + @else + {{ $log->userlog->fullName() }} + @endif + @else + Deleted User + @endif @endif