Explorar o código

Update AccountController, prevent blocking admins

Daniel Supernault %!s(int64=5) %!d(string=hai) anos
pai
achega
2c440b4882
Modificáronse 1 ficheiros con 1 adicións e 1 borrados
  1. 1 1
      app/Http/Controllers/AccountController.php

+ 1 - 1
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);