Add search by Nickname

Useful for TMNext to use Uplay nickname instead of logins for Player commands
This commit is contained in:
jonthekiller 2020-07-31 19:05:35 +02:00 committed by GitHub
parent 9c256643fa
commit c54c89897e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -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);