admins shouldnt delete themselves
This commit is contained in:
parent
a0483865bd
commit
8e1812c1d6
|
@ -42,7 +42,7 @@ class ProfileController extends Controller
|
||||||
public function selfDestroyUser()
|
public function selfDestroyUser()
|
||||||
{
|
{
|
||||||
$user = Auth::user();
|
$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();
|
$user->delete();
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue