une session admin expire après 24h
This commit is contained in:
parent
386792b5f6
commit
831a2ec875
@ -1,6 +1,13 @@
|
||||
<?php
|
||||
require_once 'fonctions.php';
|
||||
session_start();
|
||||
$timeout = 86400;
|
||||
if (isset($_SESSION['last_activity']) && time() - $_SESSION['last_activity'] > $timeout) {
|
||||
session_destroy();
|
||||
header('Location: admin.php?action=login');
|
||||
exit;
|
||||
}
|
||||
$_SESSION['last_activity'] = time();
|
||||
|
||||
// Vérifier si un utilisateur est connecté
|
||||
function checkAuth() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user