Update: 2026-05-03 17:32:57
This commit is contained in:
19
app/bootstrap/auth.php
Normal file
19
app/bootstrap/auth.php
Normal file
@@ -0,0 +1,19 @@
|
||||
<?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;
|
||||
}
|
||||
Reference in New Issue
Block a user