Enable URL Recovery from logout
This commit is contained in:
+4
-1
@@ -18,7 +18,10 @@ if (!isset($config_enable_setup) || $config_enable_setup == 1) {
|
|||||||
|
|
||||||
// Check user is logged in with a valid session
|
// Check user is logged in with a valid session
|
||||||
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
|
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
|
||||||
header("Location: login.php");
|
if($_SERVER["REQUEST_URI"] == "/")
|
||||||
|
header("Location: login.php");
|
||||||
|
else
|
||||||
|
header("Location: login.php?url=".urlencode($_SERVER["REQUEST_SCHEME"] . "://" . $_SERVER["HTTP_HOST"] . $_SERVER["REQUEST_URI"]) );
|
||||||
exit;
|
exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user