020520 Sudden logout bugfix

This commit is contained in:
Daisuke 2020-05-02 12:58:58 -05:00
parent 687ddc7068
commit 93705ba3c8
1 changed files with 6 additions and 8 deletions

View File

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