From 2411b2ed88e7b7588d9406b6aba2f2f54d5e02be Mon Sep 17 00:00:00 2001 From: xdrm-brackets Date: Sat, 3 Mar 2018 15:55:10 +0100 Subject: [PATCH] [router.controller.page] Redirect to LOGIN page if no authentication --- build/router/controller/page.php | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/build/router/controller/page.php b/build/router/controller/page.php index 748e778..e1294af 100644 --- a/build/router/controller/page.php +++ b/build/router/controller/page.php @@ -25,6 +25,16 @@ */ public function load(){ + /* (1) If not logged in -> login page*/ + if( !isset($_SESSION['AUTH']) || !is_array($_SESSION['AUTH']) || count($_SESSION['AUTH']) < 1 ){ + + include __PUBLIC__."/page/login.php"; + die(); + + } + + + /* (1) Build page file name */ $page_fname = __PUBLIC__."/page/".$this->pagename.".php";