Automatically redirect to logout page if session seems to be expired
[infodrom/hallinta] / lib / functions.js
index bcdbd88..062171a 100644 (file)
@@ -12,6 +12,8 @@ function ajax_request_callback(req)
            else
                error(data.error);
            alert(data.error);
+           if (typeof data.logout != 'undefined' && data.logout == true)
+               window.location.href = 'index.php?logout=true';
        } else if (req.oncomplete)
            req.oncomplete(data);
     }