Update AccountController, prevent blocking admins

pull/2324/head
Daniel Supernault 5 years ago
parent 4762efe8ee
commit 2c440b4882
No known key found for this signature in database
GPG Key ID: 0DEF1C662C9033F7

@ -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);

Loading…
Cancel
Save