Skip to content

Commit 8b5ccd3

Browse files
committed
Fixed a problem with the logout when the php session has ended.
1 parent 30348f1 commit 8b5ccd3

File tree

2 files changed

+5
-1
lines changed

2 files changed

+5
-1
lines changed

interface/lib/classes/auth.inc.php

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -94,7 +94,8 @@ public function remove_group_from_user($userid,$groupid) {
9494
public function check_module_permissions($module) {
9595
// Check if the current user has the permissions to access this module
9696
if(!stristr($_SESSION["s"]["user"]["modules"],$module)) {
97-
header("Location: ../index.php");
97+
echo "LOGIN_REDIRECT:/index.php";
98+
//header("Location: ../index.php");
9899
exit;
99100
}
100101
}

interface/web/js/scrigo.js

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -46,6 +46,9 @@ function submitLoginForm(formname) {
4646
loadContent(parts[1]);
4747
//redirect = parts[1];
4848
//window.setTimeout('loadContent(redirect)', 1000);
49+
} else if (o.responseText.indexOf('LOGIN_REDIRECT:') > -1) {
50+
// Go to the login page
51+
document.location.href = 'index.php';
4952
} else {
5053
document.getElementById('pageContent').innerHTML = o.responseText;
5154
}

0 commit comments

Comments
 (0)