From 4569cae57f127afd093794310ccd290d2d9fdf36 Mon Sep 17 00:00:00 2001 From: Marius Burkard <m.burkard@pixcept.de> Date: Wed, 20 Apr 2016 10:58:46 -0400 Subject: [PATCH] Merge branch 'stable-3.1' --- interface/web/index.php | 9 ++++++++- 1 files changed, 8 insertions(+), 1 deletions(-) diff --git a/interface/web/index.php b/interface/web/index.php index 7cdf5bd..c8d836d 100644 --- a/interface/web/index.php +++ b/interface/web/index.php @@ -31,10 +31,17 @@ require_once '../lib/config.inc.php'; require_once '../lib/app.inc.php'; -if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = 'login'; +// Check if we have an active users ession and redirect to login if thats not the case. +if($_SESSION['s']['user']['active'] != 1) { + header('Location: /login/'); + die(); +} + +if(!isset($_SESSION['s']['module']['name'])) $_SESSION['s']['module']['name'] = 'dashboard'; $app->uses('tpl'); $app->tpl->newTemplate('main.tpl.htm'); +$app->tpl->setVar('startpage', isset($_SESSION['s']['module']['startpage']) ? $_SESSION['s']['module']['startpage'] : ''); $app->tpl->setVar('logged_in', ($_SESSION['s']['user']['active'] != 1 ? 'n' : 'y')); // tab change warning? -- Gitblit v1.9.1