Commit d0fcd235 authored by Ad Schellevis's avatar Ad Schellevis

(mvc) trash session userdata on timeout

parent 9e1890af
...@@ -77,6 +77,9 @@ class ControllerRoot extends Controller ...@@ -77,6 +77,9 @@ class ControllerRoot extends Controller
&& $this->session->get("last_access") < (time() - 14400)) { && $this->session->get("last_access") < (time() - 14400)) {
// session expired (todo, use config timeout) // session expired (todo, use config timeout)
$this->getLogger()->error("session expired"); $this->getLogger()->error("session expired");
// cleanup session data
$this->session->remove("Username");
$this->session->remove("last_access");
$this->response->redirect("/", true); $this->response->redirect("/", true);
return false; return false;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment