reset cache on user login/logout

This commit is contained in:
ghost 2022-01-03 00:46:55 +02:00
parent 97d27fc8c9
commit f0e976f81c
2 changed files with 5 additions and 0 deletions

View File

@ -80,6 +80,8 @@ if (isset($_POST) && $_POST) {
$_SESSION['userName'] = $userName;
$_SESSION['userId'] = $userId;
$_memcache->flush();
// Redirect
header('Location: ' . PROJECT_HOST, true, 302);

View File

@ -2,7 +2,10 @@
<?php
if (isset($_SESSION['userName'])) {
session_destroy();
$_memcache->flush();
}
header('Location: ' . PROJECT_HOST, true, 302);