From 65ad36adca2d3ee9e88561fb35a5310e91188421 Mon Sep 17 00:00:00 2001 From: Lncvrt Date: Tue, 26 Aug 2025 10:34:18 -0700 Subject: [PATCH] Fix login --- database/loginAccount.php | 8 -------- 1 file changed, 8 deletions(-) diff --git a/database/loginAccount.php b/database/loginAccount.php index b40a728..9a9fd74 100644 --- a/database/loginAccount.php +++ b/database/loginAccount.php @@ -7,7 +7,6 @@ $conn = newConnection(); $post = getPostData(); $username = $post['username']; $password = $post['password']; -$currentHighScore = $post['currentHighScore'] ?? 0; $stmt = $conn->prepare("SELECT * FROM users WHERE username = ?"); $stmt->bind_param("s", $username); @@ -32,13 +31,6 @@ $stmt = $conn->prepare("UPDATE users SET latest_ip = ?, token = ? WHERE id = ?") $stmt->bind_param("ssi", $ip, $token, $id); $stmt->execute(); -if ($currentHighScore > $user['highScore']) { - $stmt = $conn->prepare("UPDATE users SET highScore = ? WHERE id = ?"); - $stmt->bind_param("ii", $currentHighScore, $id); - $stmt->execute(); - $user['highScore'] = $currentHighScore; -} - $data = ["session" => $token, "username" => $user['username'], "userid" => $id]; echo encrypt(json_encode(["success" => true, "data" => $data]));