+ User login and logoff events

This commit is contained in:
Bryan Ashby 2018-06-03 17:59:16 -06:00
parent c142a9c3d3
commit 0ae9d0d143
3 changed files with 9 additions and 1 deletions

View file

@ -6,6 +6,7 @@ const setClientTheme = require('./theme.js').setClientTheme;
const clientConnections = require('./client_connections.js').clientConnections;
const StatLog = require('./stat_log.js');
const logger = require('./logger.js');
const Events = require('./events.js');
// deps
const async = require('async');
@ -59,6 +60,8 @@ function userLogin(client, username, password, cb) {
client.log = logger.log.child( { clientId : client.log.fields.clientId, username : user.username });
client.log.info('Successful login');
Events.emit(Events.getSystemEvents().UserLogin, { user } );
async.parallel(
[
function setTheme(callback) {