mirror of
https://github.com/NuSkooler/enigma-bbs.git
synced 2025-06-11 23:24:43 +02:00
+ New user event
This commit is contained in:
parent
0ae9d0d143
commit
fbe87640c5
2 changed files with 14 additions and 3 deletions
|
@ -5,6 +5,7 @@ const userDb = require('./database.js').dbs.user;
|
|||
const Config = require('./config.js').config;
|
||||
const userGroup = require('./user_group.js');
|
||||
const Errors = require('./enig_error.js').Errors;
|
||||
const Events = require('./events.js');
|
||||
|
||||
// deps
|
||||
const crypto = require('crypto');
|
||||
|
@ -240,6 +241,10 @@ module.exports = class User {
|
|||
self.persistWithTransaction(trans, err => {
|
||||
return callback(err, trans);
|
||||
});
|
||||
},
|
||||
function sendEvent(trans, callback) {
|
||||
Events.emit(Events.getSystemEvents().NewUser, { user : self });
|
||||
return callback(null, trans);
|
||||
}
|
||||
],
|
||||
(err, trans) => {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue