Logout: Prevent SQL error on logout if already logged out in a different window/tab.
This commit is contained in:
parent
deaaf0c4eb
commit
47055cc9c3
|
|
@ -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");
|
||||
|
|
|
|||
Loading…
Reference in New Issue