[logout] [fix] [minor] Logout if session expired webnotes/erpnext#839
This commit is contained in:
parent
303327375b
commit
1281d2ca6d
1 changed files with 3 additions and 3 deletions
|
|
@ -122,11 +122,11 @@ wn.request.cleanup = function(opts, r) {
|
|||
// un-freeze page
|
||||
if(opts.freeze) wn.dom.unfreeze();
|
||||
|
||||
// session expired?
|
||||
if(r.session_expired) {
|
||||
// session expired? - Guest has no business here!
|
||||
if(r.session_expired || wn.get_cookie("sid")==="Guest") {
|
||||
if(!wn.app.logged_out) {
|
||||
msgprint(wn._('Session Expired. Logging you out'));
|
||||
wn.app.logout();
|
||||
wn.app.logout();
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue