Remove data for when you login

This commit is contained in:
2025-08-23 14:52:08 -07:00
parent a95a047882
commit fb0f3cc112

View File

@@ -8,7 +8,6 @@ $post = getPostData();
$username = $post['username']; $username = $post['username'];
$password = $post['password']; $password = $post['password'];
$currentHighScore = $post['currentHighScore'] ?? 0; $currentHighScore = $post['currentHighScore'] ?? 0;
$loginType = $post['loginType'] ?? '0';
$stmt = $conn->prepare("SELECT * FROM users WHERE username = ?"); $stmt = $conn->prepare("SELECT * FROM users WHERE username = ?");
$stmt->bind_param("s", $username); $stmt->bind_param("s", $username);
@@ -42,24 +41,6 @@ if ($currentHighScore > $user['highScore']) {
$data = ["session" => $token, "username" => $user['username'], "userid" => $id]; $data = ["session" => $token, "username" => $user['username'], "userid" => $id];
if ($loginType === "0") {
$data += [
"highscore" => (string)$user['highScore'],
"icon" => (int)$user['icon'],
"overlay" => (int)$user['overlay'],
"totalNormalBerries" => (string)$user['totalNormalBerries'],
"totalPoisonBerries" => (string)$user['totalPoisonBerries'],
"totalSlowBerries" => (string)$user['totalSlowBerries'],
"totalUltraBerries" => (string)$user['totalUltraBerries'],
"totalSpeedyBerries" => (string)$user['totalSpeedyBerries'],
"totalCoinBerries" => (string)$user['totalCoinBerries'],
"totalAttempts" => (string)$user['totalAttempts'],
"birdColor" => json_decode((string)$user['birdColor']),
"overlayColor" => json_decode((string)$user['overlayColor']),
"marketplaceData" => json_decode((string)$user['marketplaceData'])
];
}
echo encrypt(json_encode(["success" => true, "data" => $data])); echo encrypt(json_encode(["success" => true, "data" => $data]));
$stmt->close(); $stmt->close();