empty SessionID sends the user to login page

If the session is empty, it now sends you to the login page with a safed url so it can revert you back to the right page after login
This commit is contained in:
Lars van Hijfte
2017-02-02 17:43:32 +01:00
parent b1941f0191
commit f8c9454b85
11 changed files with 44 additions and 30 deletions

View File

@@ -8,6 +8,8 @@ function postComment(buttonValue) {
).done(function (response) {
if (response == "frozen") {
alert("Je account is bevroren, dus je kan geen comments plaatsen of \"niet slechten\". Contacteer een admin als je denkt dat dit onjuist is.");
} else if (response == "logged out") {
window.location.href = "login.php?url=" + window.location.pathname;
}
});
@@ -30,6 +32,8 @@ function deletePost(postID) {
).done(function (response) {
if (response == "frozen") {
alert("Je account is bevroren, dus je kan geen posts verwijderen. Contacteer een admin als je denkt dat dit onjuist is.");
} else if (response == "logged out") {
window.location.href = "login.php?url=" + window.location.pathname;
}
});
closeModal();