1.4.x backport

This commit is contained in:
2025-10-08 09:59:26 -07:00
parent 8c13c24066
commit 9068227c72
12 changed files with 168 additions and 9 deletions

View File

@@ -0,0 +1,23 @@
<?php
$token = $_POST['gameSession'] ?? '';
$username = $_POST['userName'] ?? '';
$conn = newConnection();
$stmt = $conn->prepare("SELECT * FROM users WHERE token = ? AND username = ?");
$stmt->bind_param("ss", $token, $username);
$stmt->execute();
$result = $stmt->get_result();
if ($result->num_rows > 0) {
$row = $result->fetch_assoc();
$savedata = json_decode($row['save_data'], true);
$icon = $savedata['bird']['icon'] ?? 1;
$overlay = $savedata['bird']['overlay'] ?? 0;
echo "1:" . $row['legacy_high_score'] . ":" . $icon . ":" . $overlay;
} else {
echo "-1";
}
$stmt->close();
$conn->close();