diff options
| author | ilotterytea <iltsu@alright.party> | 2025-05-10 23:44:31 +0500 |
|---|---|---|
| committer | ilotterytea <iltsu@alright.party> | 2025-05-10 23:44:31 +0500 |
| commit | 2993b707e835af3ae759da749370b8ba9755ef1b (patch) | |
| tree | 78829b4b3d734534947cee9960a9d34027f0cde0 /public/account | |
| parent | 146926758de64427dabe1eccd97cfbe6e4394d10 (diff) | |
feat: signout button
Diffstat (limited to 'public/account')
| -rw-r--r-- | public/account/signout.php | 16 |
1 files changed, 16 insertions, 0 deletions
diff --git a/public/account/signout.php b/public/account/signout.php new file mode 100644 index 0000000..f971d4a --- /dev/null +++ b/public/account/signout.php @@ -0,0 +1,16 @@ +<?php +include_once $_SERVER["DOCUMENT_ROOT"] . '/../src/accounts.php'; +include_once $_SERVER["DOCUMENT_ROOT"] . '/../src/alert.php'; + +if (!isset($_GET["local"])) { + header("Location: /"); + exit; +} + +session_start(); + +setcookie("secret_key", "", time() - 1000, "/"); +session_unset(); +session_destroy(); + +generate_alert("/", "Signed out!", 200);
\ No newline at end of file |
