<?php
session_start();
$_SESSION['user_id'] = 4; // Use the same user from DB

require_once 'config/constants.php';
require_once 'config/db.php';
require_once 'controllers/UserController.php';

$controller = new UserController($conn);

echo "Executing sendWishes()...\n";
ob_start();
try {
    $controller->sendWishes();
} catch (Exception $e) {
    echo "Exception: " . $e->getMessage() . "\n";
}
$output = ob_get_clean();
echo "Output: $output\n";

echo "Check logs/pdf_debug.log to see if PDF was generated successfully.\n";
