From 2c440b4882d7ec093d9fc18087de0dc98e10958f Mon Sep 17 00:00:00 2001 From: Daniel Supernault Date: Sun, 12 Jul 2020 21:12:39 -0600 Subject: [PATCH] Update AccountController, prevent blocking admins --- app/Http/Controllers/AccountController.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/Http/Controllers/AccountController.php b/app/Http/Controllers/AccountController.php index a1838076..09f4ba1c 100644 --- a/app/Http/Controllers/AccountController.php +++ b/app/Http/Controllers/AccountController.php @@ -244,7 +244,7 @@ class AccountController extends Controller switch ($type) { case 'user': $profile = Profile::findOrFail($item); - if ($profile->id == $user->id) { + if ($profile->id == $user->id || $profile->user->is_admin == true) { return abort(403); } $class = get_class($profile);