020520 Sudden logout bugfix
This commit is contained in:
parent
687ddc7068
commit
93705ba3c8
14
index.php
14
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/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.
|
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 part of the url query is an ajax action, this file will handle it */
|
||||||
if(isset($_GET['action']) || isset($_POST['action'])){
|
if(isset($_GET['action']) || isset($_POST['action'])){
|
||||||
include "action.php";
|
include "action.php";
|
||||||
@ -63,6 +55,12 @@ if(isset($_GET['code'])){
|
|||||||
/* the header and other layout elements will be included only if the
|
/* the header and other layout elements will be included only if the
|
||||||
call is not an AJAX request */
|
call is not an AJAX request */
|
||||||
if(!isset($_GET['ajax'])){
|
if(!isset($_GET['ajax'])){
|
||||||
|
if ($logedin){
|
||||||
|
$info = api_get("accounts/verify_credentials");
|
||||||
|
if(!$info['display_name']){
|
||||||
|
header('Location: ./logout');
|
||||||
|
}
|
||||||
|
}
|
||||||
include "layout/header.php";
|
include "layout/header.php";
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user