admins shouldnt delete themselves

This commit is contained in:
1day2die 2023-01-11 11:46:29 +01:00
parent a0483865bd
commit 8e1812c1d6

View file

@ -42,7 +42,7 @@ class ProfileController extends Controller
public function selfDestroyUser()
{
$user = Auth::user();
//if ($user->role == "admin") return back()->with("error", "You cannot delete yourself as an admin!");
if ($user->role == "admin") return back()->with("error", "You cannot delete yourself as an admin!");
$user->delete();