admins shouldnt delete themselves
This commit is contained in:
parent
a0483865bd
commit
8e1812c1d6
1 changed files with 1 additions and 1 deletions
|
@ -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();
|
||||
|
||||
|
|
Loading…
Add table
Reference in a new issue