Session expiration bug fix
parent
16854f0f77
commit
67ba6b38c7
|
@ -15,12 +15,14 @@ function applySessionMiddleware($config, $app_root, $isTest = false) {
|
||||||
|
|
||||||
// Check session validity
|
// Check session validity
|
||||||
if (!Session::isValidSession()) {
|
if (!Session::isValidSession()) {
|
||||||
|
// Only show session timeout message if there was an active session
|
||||||
|
if (isset($_SESSION['LAST_ACTIVITY'])) {
|
||||||
|
Feedback::flash('LOGIN', 'SESSION_TIMEOUT');
|
||||||
|
}
|
||||||
|
|
||||||
// Session invalid, clean up and redirect
|
// Session invalid, clean up and redirect
|
||||||
Session::cleanup($config);
|
Session::cleanup($config);
|
||||||
|
|
||||||
// Flash session timeout message
|
|
||||||
Feedback::flash('LOGIN', 'SESSION_TIMEOUT');
|
|
||||||
|
|
||||||
if (!$isTest) {
|
if (!$isTest) {
|
||||||
header('Location: ' . $app_root . '?page=login');
|
header('Location: ' . $app_root . '?page=login');
|
||||||
exit();
|
exit();
|
||||||
|
|
Loading…
Reference in New Issue