Created
May 20, 2017 07:43
-
-
Save muzfr7/6cd3cea9bd60059ccd8de0cfb55fee35 to your computer and use it in GitHub Desktop.
Automatically logout user in 1 hour if he is not changing pages.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
* Automatically logout user in 1 hour on no activity | |
*/ | |
setTimeout(function(){ | |
window.open("http://www.yoursite.com/user/logout", "_self") | |
}, 1000*60*60); // logout in 1 hour |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment