Logout: Prevent SQL error on logout if already logged out in a different window/tab.

This commit is contained in:
Nate Jones 2015-04-12 19:48:29 +00:00
parent deaaf0c4eb
commit 47055cc9c3
1 changed files with 68 additions and 66 deletions

View File

@ -28,6 +28,7 @@ include "root.php";
require_once "resources/require.php";
//check for login return preference
if ($_SESSION["user_uuid"] != '') {
if ($_SESSION['login']['destination_last']['boolean'] == 'true') {
if ($_SERVER['HTTP_REFERER'] != '') {
//convert to relative path
@ -101,6 +102,7 @@ require_once "resources/require.php";
$db->exec(check_sql($sql));
unset($sql);
}
}
//redirect the user to the index page
header("Location: ".PROJECT_PATH."/login.php");