35512-vm/auth-check.php
Flatlogic Bot 2497a13797 fix 11
2025-11-05 23:31:33 +00:00

13 lines
499 B
PHP

<?php
error_log("--- auth-check.php: Start ---");
error_log("auth-check.php: Session status: " . session_status());
error_log("auth-check.php: Session ID: " . session_id());
error_log("auth-check.php: Checking for user_id in \$_SESSION: " . print_r($_SESSION, true));
if (!isset($_SESSION['user_id'])) {
error_log("auth-check.php: user_id NOT SET. Redirecting to login.php");
header("Location: login.php");
exit;
}
error_log("auth-check.php: user_id IS SET. User is authenticated.");
?>