diff --git a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
index 7e39e74..04e0f4a 100644
--- a/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
+++ b/400-SOURCECODE/AIAHTML5.Web/app/controllers/HomeController.js
@@ -1629,10 +1629,10 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
userId: null,
tagName: null,
loginStatus: null,
- isAlreadyLoggedIn:$rootScope.isAlreadyLoggedIn
+ isAlreadyLoggedIn:null
}
console.log('user session start');
- $rootScope.CheckUserSession('insert');
+ $rootScope.CheckUserSession('insert',$rootScope.isAlreadyLoggedIn);
$rootScope.$on('IdleStart', function() {
// this event fire when idle time finish and time out start
@@ -1650,14 +1650,14 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
// config set in AIA.js -:IdleProvider.timeout(15);
$rootScope.isSessionTimeout=true;
console.log('session is timeout');
- $rootScope.CheckUserSession('logout');
+ $rootScope.CheckUserSession('logout',true);
});
$rootScope.$on('Keepalive', function() {
// it watch the session on perticular time interval during idle time period
// config set in AIA.js -: KeepaliveProvider.interval(10);
//we will use it to recieve request from databse if user logout from admin activity
console.log('ping user session');
- $rootScope.CheckUserSession('update');
+ $rootScope.CheckUserSession('update',true);
});
@@ -1684,7 +1684,7 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.isSessionTimeout=true;
localStorage.removeItem('loggedInUserDetails');
localStorage.clear();
- $rootScope.CheckUserSession('logout');
+ $rootScope.CheckUserSession('logout',true);
$timeout(function(){
document.location = '/';
$rootScope.isVisibleLogin = true;
@@ -1699,20 +1699,20 @@ function ($rootScope, $scope, Modules, $log, $location, $compile, $timeout, Data
$rootScope.isVisibleLogin = true;
}
- $rootScope.CheckUserSession = function (tagName) {
+ $rootScope.CheckUserSession = function (tagName,isAlreadyLoggedIn) {
//console.log('user login id: '+$rootScope.userData.Id);
//console.log('user login activity tag: '+tagName);
if($rootScope.userData==undefined) return;
//incase site user login userid is 0 so then using license id
$rootScope.userStatus.userId=$rootScope.userData.Id==0?$rootScope.userData.LicenseId:$rootScope.userData.Id;
$rootScope.userStatus.tagName=tagName;
+ $rootScope.userStatus.isAlreadyLoggedIn=isAlreadyLoggedIn;
+ $rootScope.isAlreadyLoggedIn=true;
AuthenticationService.ManageUserLoginStatus($rootScope.userStatus)
.then(
function (loginStatus) {
if(loginStatus!=null)
{
- $rootScope.userStatus.loginStatus = loginStatus;
- $rootScope.userStatus.isAlreadyLoggedIn=true;
if(loginStatus=='False')
{
$rootScope.LogoutUserSession();
diff --git a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
index f7dc406..feee6f9 100644
--- a/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
+++ b/400-SOURCECODE/Admin/src/app/components/UserEntity/users.component.ts
@@ -392,7 +392,8 @@ export class UsersList implements OnInit, AfterViewChecked {
this._loadingService.ShowLoading("global-loading");
this.userservice.ManageUserLoginStatus({
userId: this.selectedId,
- tagName: 'logout'
+ tagName: 'logout',
+ isAlreadyLoggedIn:true
}).subscribe(x => {
console.log(x);
this.EditbuttonStatus=undefined;