Make check for idle session more specific

in order to avoid collision with a social auth session's startup.
This commit is contained in:
Jared Tabor 2016-07-27 11:28:05 -07:00
parent f53a1b8f6c
commit 45e506ec0f

View File

@ -872,7 +872,7 @@ var tower = angular.module('Tower', [
} else {
var lastUser = $cookieStore.get('current_user'),
timestammp = Store('sessionTime');
if(lastUser && lastUser.id && timestammp && timestammp[lastUser.id]){
if(lastUser && lastUser.id && timestammp && timestammp[lastUser.id] && timestammp[lastUser.id].loggedIn){
var stime = timestammp[lastUser.id].time,
now = new Date().getTime();
if ((stime - now) <= 0) {