-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathlogout.php
More file actions
executable file
·33 lines (29 loc) · 863 Bytes
/
logout.php
File metadata and controls
executable file
·33 lines (29 loc) · 863 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
<?php
/**
* Stimma - Learn in small steps
* Copyright (C) 2025 Christian Alfredsson
*
* This program is free software; licensed under GPL v2.
* See LICENSE and LICENSE-AND-TRADEMARK.md for details.
*
* The name "Stimma" is a trademark and subject to restrictions.
*/
/**
* Logout handler
*
* This file handles user logout functionality:
* - Destroys the user's session
* - Clears authentication data
* - Redirects to the login page
*/
// Start session and include required files
session_start();
require_once 'include/config.php';
require_once 'include/database.php';
require_once 'include/functions.php';
require_once 'include/auth.php';
// Set flash message for user feedback
$_SESSION['flash_message'] = 'Du har loggats ut.';
$_SESSION['flash_type'] = 'info';
// Execute logout function to clear session and authentication data
logout();