diff --git a/index.php b/index.php index 33907e3..0997dac 100644 --- a/index.php +++ b/index.php @@ -42,14 +42,6 @@ include "settings.php"; # the general settings of the FE include "include/init.php"; # initializes the page load with some variables and cookies include "include/functions.php"; # the functions that are used on all the FE files. -if ($logedin){ - $info = api_get("accounts/verify_credentials"); - if(!$info['display_name']){ - header('Location: ./logout'); - } -} - - /* if part of the url query is an ajax action, this file will handle it */ if(isset($_GET['action']) || isset($_POST['action'])){ include "action.php"; @@ -63,6 +55,12 @@ if(isset($_GET['code'])){ /* the header and other layout elements will be included only if the call is not an AJAX request */ if(!isset($_GET['ajax'])){ + if ($logedin){ + $info = api_get("accounts/verify_credentials"); + if(!$info['display_name']){ + header('Location: ./logout'); + } + } include "layout/header.php"; }