Added ability to return (on login) to last visited page on logout.

This commit is contained in:
Nate Jones
2015-04-04 18:46:44 +00:00
parent a58479f825
commit f768825085
2 changed files with 83 additions and 3 deletions
+6 -2
View File
@@ -155,7 +155,7 @@ require_once "resources/require.php";
//prepare the uuids
$user_uuid = uuid();
$contact_uuid = uuid();
//set the user_id
$_SESSION["user_uuid"] = $user_uuid;
@@ -379,10 +379,14 @@ require_once "resources/require.php";
//redirect the user
if (check_str($_REQUEST["rdr"]) !== 'n'){
$path = check_str($_POST["path"]);
if(isset($path) && !empty($path) && $path!="index2.php" && $path!="/install.php") {
if (isset($path) && !empty($path) && $path!="index2.php" && $path!="/install.php") {
header("Location: ".$path);
exit();
}
else if ($_SESSION['login']['destination']['url'] != '') {
header("Location: ".$_SESSION['login']['destination']['url']);
exit();
}
}
}