From c11a452334e30e1dc9d87fc4d52d57c91715530f Mon Sep 17 00:00:00 2001 From: flashwave Date: Tue, 25 Sep 2018 23:58:31 +0200 Subject: [PATCH] Added ability to get to profile by username. --- public/profile.php | 3 +++ 1 file changed, 3 insertions(+) diff --git a/public/profile.php b/public/profile.php index 21c4973c..ef33abbf 100644 --- a/public/profile.php +++ b/public/profile.php @@ -84,8 +84,11 @@ switch ($mode) { LEFT JOIN `msz_roles` as r ON r.`role_id` = u.`display_role` WHERE `user_id` = :user_id + OR LOWER(`username`) = LOWER(:username) + LIMIT 1 '); $getProfile->bindValue('user_id', $userId); + $getProfile->bindValue('username', $_GET['u'] ?? ''); $profile = $getProfile->execute() ? $getProfile->fetch() : []; if (!$profile) {