From 10548c9d8fa79f10df915b9c4aaaa7aa98e42ad1 Mon Sep 17 00:00:00 2001 From: Nobody Date: Sat, 17 Oct 2020 18:26:34 +0100 Subject: [PATCH] Update message and update query --- app/Console/Commands/User/DeleteUserCommand.php | 5 +++-- resources/lang/en/command/messages.php | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/app/Console/Commands/User/DeleteUserCommand.php b/app/Console/Commands/User/DeleteUserCommand.php index f458b51dc..64885dca1 100644 --- a/app/Console/Commands/User/DeleteUserCommand.php +++ b/app/Console/Commands/User/DeleteUserCommand.php @@ -58,8 +58,9 @@ class DeleteUserCommand extends Command Assert::notEmpty($search, 'Search term should be an email address, got: %s.'); $results = User::query() - ->where('email', 'LIKE', "$search%") - ->where('username', 'LIKE', "$search%") + ->where('id', 'LIKE', "$search%") + ->orWhere('username', 'LIKE', "$search%") + ->orWhere('email', 'LIKE', "$search%") ->get(); if (count($results) < 1) { diff --git a/resources/lang/en/command/messages.php b/resources/lang/en/command/messages.php index 71731a2d0..002c699bb 100644 --- a/resources/lang/en/command/messages.php +++ b/resources/lang/en/command/messages.php @@ -14,7 +14,7 @@ return [ 'deleted' => 'Successfully deleted the requested location.', ], 'user' => [ - 'search_users' => 'Enter a Username, UUID, or Email Address', + 'search_users' => 'Enter a Username, User ID, or Email Address', 'select_search_user' => 'ID of user to delete (Enter \'0\' to re-search)', 'deleted' => 'User successfully deleted from the Panel.', 'confirm_delete' => 'Are you sure you want to delete this user from the Panel?',