Explorar el Código

admins shouldnt delete themselves

1day2die hace 2 años
padre
commit
8e1812c1d6
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      app/Http/Controllers/ProfileController.php

+ 1 - 1
app/Http/Controllers/ProfileController.php

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