From 6596a76c856e2ddfccbc5f03d12a524fdf80e1bf Mon Sep 17 00:00:00 2001 From: Syndamia Date: Sun, 26 Jan 2025 16:10:15 +0200 Subject: feat: Logout button --- controllers/login.php | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'controllers') diff --git a/controllers/login.php b/controllers/login.php index 7502b03..8b640ce 100644 --- a/controllers/login.php +++ b/controllers/login.php @@ -21,3 +21,11 @@ function on_post() { $user_status = "User \"" . $_POST["username"] . "\" doesn't exist!"; } } + +function on_delete() { + try { + $headers = apache_request_headers(); + Database\Cookie::delete($headers["Authorization"]); + } + catch(Exception $e) {} +} -- cgit v1.2.3