9262b09c4d
- Implemented roadmap.php for managing roadmap items with filtering options by quarter and status. - Added a service worker (sw.js) to handle push notifications and click events for calendar appointments. - Created users.php for admin to manage team members and invitations, including user creation and deletion functionalities.
45 lines
963 B
PHP
45 lines
963 B
PHP
<?php
|
|
/**
|
|
* Fociz Uitloggen
|
|
*/
|
|
|
|
require_once __DIR__ . '/../includes/auth.php';
|
|
start_secure_session();
|
|
|
|
// Vernietig persistente login in database
|
|
if (!empty($_SESSION['user_id'])) {
|
|
try {
|
|
$db = get_db_connection();
|
|
ensure_remember_token_columns($db);
|
|
$stmt = $db->prepare("UPDATE users SET remember_token = NULL, remember_token_expires_at = NULL WHERE id = ?");
|
|
$stmt->execute([$_SESSION['user_id']]);
|
|
} catch (Throwable $e) {
|
|
// Stil negeren bij uitloggen
|
|
}
|
|
}
|
|
|
|
// Verwijder remember cookie
|
|
clear_remember_cookie();
|
|
|
|
// Vernietig alle sessie variabelen
|
|
$_SESSION = [];
|
|
|
|
if (ini_get("session.use_cookies")) {
|
|
$params = session_get_cookie_params();
|
|
setcookie(
|
|
session_name(),
|
|
'',
|
|
time() - 42000,
|
|
$params["path"],
|
|
$params["domain"],
|
|
$params["secure"],
|
|
$params["httponly"]
|
|
);
|
|
}
|
|
|
|
session_destroy();
|
|
|
|
header('Location: /auth/login.php');
|
|
exit;
|
|
|