Merge pull request #4 from jonthekiller/jonthekiller-patch-4

Add search by Nickname
This commit is contained in:
jonthekiller 2020-08-02 18:26:20 +02:00 committed by GitHub
commit f226fefab8
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);