From d5e5b40a6f3fc24c070f169e3b4e4d7524f03d8d Mon Sep 17 00:00:00 2001 From: Martin Ambrus Date: Sun, 22 Oct 2017 12:21:32 +0200 Subject: [PATCH] fix: user field gets Multihunter only when really no ID or name given --- GameEngine/Admin/database.php | 1 - GameEngine/Database.php | 2 +- 2 files changed, 1 insertion(+), 2 deletions(-) diff --git a/GameEngine/Admin/database.php b/GameEngine/Admin/database.php index 23017006..acec1327 100755 --- a/GameEngine/Admin/database.php +++ b/GameEngine/Admin/database.php @@ -79,7 +79,6 @@ class adm_DB { } mysqli_query($this->connection,"Insert into ".TB_PREFIX."admin_log values (0,'X','$username logged in (IP: ".$_SERVER['REMOTE_ADDR'].")',".time().")"); - return true; } else { diff --git a/GameEngine/Database.php b/GameEngine/Database.php index 0870700a..384b8c89 100755 --- a/GameEngine/Database.php +++ b/GameEngine/Database.php @@ -214,7 +214,7 @@ class MYSQLi_DB { list($ref, $field, $mode) = $this->escape_input($ref, $field, $mode); // update for Multihunter's username and ID - if ($ref == '' || $ref == 0) { + if (($mode && $ref == '') || (!$mode && $ref == 0)) { $ref = 'Multihunter'; $mode = 1; }