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) {