Commit b67d3a70 authored by ZeMKI's avatar ZeMKI
Browse files

Update DeleteUserCommand.php

parent ad45c520
......@@ -44,7 +44,7 @@ class DeleteUserCommand extends Command
if ($info === "email") {
$email = $this->ask('Enter email');
try {
$user = User::where('email', '=', $email)->firstOrFail();
$user = User::where('email', '=', $email)->withTrashed()->firstOrFail();
} catch (ModelNotFoundException $e) {
$this->warn("user not found!");
......@@ -53,7 +53,7 @@ class DeleteUserCommand extends Command
}else{
$id = $this->ask('Enter id');
try {
$user = User::where('id', '=', $id)->firstOrFail();
$user = User::where('id', '=', $id)->withTrashed()->firstOrFail();
} catch (ModelNotFoundException $e) {
$this->warn("user not found!");
......@@ -64,7 +64,7 @@ class DeleteUserCommand extends Command
if($this->confirm("ARE YOU SURE YOU WANT TO DELETE THIS USER? ".$user->email, false))
{
$whichDelete = $this->choice('Soft or Force deletion?', ['Soft', 'Force']);
if($whichDelete == "force"){
if($whichDelete == "Force"){
$user->forceDelete();
}else{
$user->delete();
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment