Browse Source

reset cache on user login/logout

main
ghost 3 years ago
parent
commit
f0e976f81c
  1. 2
      src/application/controller/login.php
  2. 3
      src/application/controller/logout.php

2
src/application/controller/login.php

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

3
src/application/controller/logout.php

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