Browse Source

modding #1857

tags/v0.10.6^2
Shaun 2 years ago
parent
commit
41c257e222
1 changed files with 15 additions and 0 deletions
  1. +15
    -0
      src/server/components/auth.js

+ 15
- 0
src/server/components/auth.js View File

@@ -340,6 +340,20 @@ module.exports = {
}
}

const emBeforeRegisterAccount = {
obj: this.obj,
success: true,
msg: null
};

eventEmitter.emit('onBeforeRegisterAccount', emBeforeRegisterAccount);

if (!emBeforeRegisterAccount.success) {
msg.callback(emBeforeRegisterAccount.msg);

return;
}

let exists = await io.getAsync({
key: credentials.username,
ignoreCase: true,
@@ -350,6 +364,7 @@ module.exports = {

if (exists) {
msg.callback(messages.login.exists);

return;
}



Loading…
Cancel
Save