From b79c5bac527dc5f93f1fab6e1d11daf27135403b Mon Sep 17 00:00:00 2001
From: Till Brehm <tbrehm@ispconfig.org>
Date: Tue, 10 Nov 2015 10:55:40 -0500
Subject: [PATCH] New ISPConfig login.

---
 interface/web/index.php |    8 +++++++-
 1 files changed, 7 insertions(+), 1 deletions(-)

diff --git a/interface/web/index.php b/interface/web/index.php
index 7cdf5bd..6340467 100644
--- a/interface/web/index.php
+++ b/interface/web/index.php
@@ -31,7 +31,13 @@
 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');

--
Gitblit v1.9.1