Skip to content
Snippets Groups Projects
Commit 8b5ccd30 authored by tbrehm's avatar tbrehm
Browse files

Fixed a problem with the logout when the php session has ended.

parent 30348f16
No related branches found
No related tags found
No related merge requests found
......@@ -94,7 +94,8 @@ class auth {
public function check_module_permissions($module) {
// Check if the current user has the permissions to access this module
if(!stristr($_SESSION["s"]["user"]["modules"],$module)) {
header("Location: ../index.php");
echo "LOGIN_REDIRECT:/index.php";
//header("Location: ../index.php");
exit;
}
}
......
......@@ -46,6 +46,9 @@ function submitLoginForm(formname) {
loadContent(parts[1]);
//redirect = parts[1];
//window.setTimeout('loadContent(redirect)', 1000);
} else if (o.responseText.indexOf('LOGIN_REDIRECT:') > -1) {
// Go to the login page
document.location.href = 'index.php';
} else {
document.getElementById('pageContent').innerHTML = o.responseText;
}
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment