From c54c89897e39ccc90c4340bc80eec2a122ee79b8 Mon Sep 17 00:00:00 2001 From: jonthekiller Date: Fri, 31 Jul 2020 19:05:35 +0200 Subject: [PATCH] Add search by Nickname Useful for TMNext to use Uplay nickname instead of logins for Player commands --- core/Players/PlayerManager.php | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/core/Players/PlayerManager.php b/core/Players/PlayerManager.php index e4f7032c..68e0188d 100644 --- a/core/Players/PlayerManager.php +++ b/core/Players/PlayerManager.php @@ -579,7 +579,8 @@ class PlayerManager implements CallbackListener, TimerListener, CommunicationLis $mysqli = $this->maniaControl->getDatabase()->getMysqli(); $query = "SELECT * FROM `" . self::TABLE_PLAYERS . "` - WHERE `login` LIKE '" . $mysqli->escape_string($playerLogin) . "';"; + WHERE `login` LIKE '" . $mysqli->escape_string($playerLogin) . "' + OR `nickname` LIKE '" . $mysqli->escape_string($playerLogin) . "';"; $result = $mysqli->query($query); if (!$result) { trigger_error($mysqli->error);