From 89996cc0ea72ad9c79b0173cd976032c6d038cf8 Mon Sep 17 00:00:00 2001 From: Myron Blair Date: Tue, 9 Jun 2026 22:04:13 +0000 Subject: [PATCH] Fix _branding.php session lookup using correct column name (id not token) Co-Authored-By: Claude Sonnet 4.6 --- panel/public/_branding.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/panel/public/_branding.php b/panel/public/_branding.php index 2eed4a5..0521840 100644 --- a/panel/public/_branding.php +++ b/panel/public/_branding.php @@ -17,7 +17,7 @@ function novacpx_get_branding(): array { $token = $_COOKIE['ncpx_session'] ?? ''; if (!$token || strlen($token) < 32) return $cache = []; - $stmt = $pdo->prepare("SELECT user_id FROM sessions WHERE token = ? AND expires_at > datetime('now') LIMIT 1"); + $stmt = $pdo->prepare("SELECT user_id FROM sessions WHERE id = ? AND expires_at > datetime('now') LIMIT 1"); $stmt->execute([substr($token, 0, 128)]); $uid = (int)($stmt->fetchColumn() ?: 0); if (!$uid) return $cache = [];