<?php
/**
 * Global Auth State (Optional Helper)
 */

declare(strict_types=1);

// This can be used to store the current user globally if needed
// after successful middleware check.

$GLOBALS['current_user'] = null;

function current_user() {
    return $GLOBALS['current_user'];
}

function set_current_user(array $user) {
    $GLOBALS['current_user'] = $user;
}
