Add minutes used to logoff event

This commit is contained in:
Bryan Ashby 2019-01-17 20:13:49 -07:00
parent 403ee891d5
commit 680898b56b
1 changed files with 2 additions and 1 deletions

View File

@ -120,7 +120,8 @@ function removeClient(client) {
); );
if(client.user && client.user.isValid()) { if(client.user && client.user.isValid()) {
Events.emit(Events.getSystemEvents().UserLogoff, { user : client.user } ); const minutesOnline = moment().diff(moment(client.user.properties[UserProps.LastLoginTs]), 'minutes');
Events.emit(Events.getSystemEvents().UserLogoff, { user : client.user, minutesOnline } );
} }
Events.emit( Events.emit(