feat(home): add a cron job to check users account status to idle if for lang time no sign in

This commit is contained in:
OldHawk
2018-04-26 18:45:34 +08:00
parent c136463cf9
commit 63572afc28
15 changed files with 89 additions and 37 deletions

View File

@@ -183,7 +183,10 @@
NotifycationService.showNotify('info', null, $translate.instant('SIGN.SIGNIN_WELCOME_NORMAL', {name: response.displayName}));
}
if (vm.authentication.user.status === 'idle') {
NotifycationService.showNotify('error', null, $translate.instant('SIGN.SIGNIN_WELCOME_IDLE', {name: response.displayName}));
NotifycationService.showNotify('error', null, $translate.instant('SIGN.SIGNIN_WELCOME_IDLE', {
name: response.displayName,
days: (vm.signConfig.idle.accountIdleForTime / (60 * 60 * 1000 * 24))
}));
}
// And redirect to the previous or home page
$state.go($state.previous.state.name || 'home', $state.previous.params);