From 96bd9da23e4c45c4b07966628ecbb27c8bdeb5ee Mon Sep 17 00:00:00 2001 From: Thomas Rubini <74205383+ThomasRubini@users.noreply.github.com> Date: Mon, 23 Jan 2023 13:46:36 +0100 Subject: [PATCH] Select only needed fields in UserModel::searchUsers() --- Models/UserModel.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/Models/UserModel.php b/Models/UserModel.php index a7ef0f5..43b417a 100644 --- a/Models/UserModel.php +++ b/Models/UserModel.php @@ -85,7 +85,8 @@ final class UserModel extends UserSessionModel { $O_model = Model::get(); $stmt = $O_model->prepare(" - SELECT * FROM USER + SELECT ID, EMAIL, USERNAME + FROM USER WHERE USER.USERNAME LIKE :full_query OR USER.EMAIL LIKE :full_query LIMIT 10