mirror of https://github.com/itflow-org/itflow
Merge pull request #948 from ssteeltm/master
Enable URL Recovery from logout
This commit is contained in:
commit
aca1a13104
|
|
@ -18,7 +18,11 @@ if (!isset($config_enable_setup) || $config_enable_setup == 1) {
|
|||
|
||||
// Check user is logged in with a valid session
|
||||
if (!isset($_SESSION['logged']) || !$_SESSION['logged']) {
|
||||
header("Location: login.php");
|
||||
if ($_SERVER["REQUEST_URI"] == "/") {
|
||||
header("Location: login.php");
|
||||
} else {
|
||||
header("Location: login.php?last_visited=" . base64_encode($_SERVER["REQUEST_URI"]) );
|
||||
}
|
||||
exit;
|
||||
}
|
||||
|
||||
|
|
@ -84,4 +88,3 @@ $num_notifications = $row['num'];
|
|||
//if ($session_user_config_force_mfa == 1 && $session_token == NULL) {
|
||||
// header("Location: force_mfa.php");
|
||||
//}
|
||||
|
||||
|
|
|
|||
|
|
@ -218,9 +218,11 @@ if (isset($_POST['login'])) {
|
|||
//}
|
||||
|
||||
}
|
||||
|
||||
header("Location: $config_start_page");
|
||||
|
||||
if ($_GET['last_visited']) {
|
||||
header("Location: ".$_SERVER["REQUEST_SCHEME"] . "://" . $config_base_url . base64_decode($_GET['last_visited']) );
|
||||
} else {
|
||||
header("Location: $config_start_page");
|
||||
}
|
||||
} else {
|
||||
|
||||
// MFA is configured and needs to be confirmed, or was unsuccessful
|
||||
|
|
|
|||
Loading…
Reference in New Issue