after role back

This commit is contained in:
2021-03-26 11:00:45 +01:00
parent 0131511be1
commit bcb6bf0bf4
4 changed files with 38 additions and 27 deletions
+9
View File
@@ -8,3 +8,12 @@ function isAdmin(): bool
return isset($_SESSION['admin']);
}
function makeAdminLogin(string $userName)
{
setcookie("userName", $userName, [
'expires' => 0,
'samesite' => 'Strict',
'path' => '/'
]);
}