[router.controller.page] Redirect to LOGIN page if no authentication

This commit is contained in:
xdrm-brackets 2018-03-03 15:55:10 +01:00
parent b537644258
commit 2411b2ed88
1 changed files with 10 additions and 0 deletions

View File

@ -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";