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

@@ -43,6 +43,8 @@ function sendMessage() {
).done(function(response) {
if (response == "frozen") {
alert("Je account is bevroren, dus je kan niet chat berichten versturen. Contacteer een admin als je denkt dat dit onjuist is.");
} else if (response == "logged out") {
window.location.href = "login.php?url=" + window.location.pathname;
}
// Load messages if the message has been send, so it shows in the chat.
loadMessages();