prepare("SELECT * FROM main.token WHERE token = ?"); $stmt->execute([$token]); $result = $stmt->fetch(PDO::FETCH_ASSOC); if (!$result) return null; $username = $result['username']; $stmt = $db->prepare("SELECT * FROM main.auth WHERE username = ?"); $stmt->execute([$username]); $result = $stmt->fetch(PDO::FETCH_ASSOC); if (!$result) return null; $stmt = $db->prepare("SELECT * FROM main.ban WHERE username = ?"); $stmt->execute([$username]); $result = $stmt->fetch(PDO::FETCH_ASSOC); if (!$result) return $username; $reason = $result['reason']; ?>
You are banned for .