Просмотр исходного кода

modding #1960: Add the username to the onBeforeRegisterAccount and onBeforeLogin events

(cherry picked from commit 9088cc2e80)
tags/v0.11.0.7^0
Shaun 1 год назад
committed by Big Bad Waffle
Родитель
Сommit
ee67a2105e
1 измененных файлов: 4 добавлений и 2 удалений
  1. +4
    -2
      src/server/components/auth.js

+ 4
- 2
src/server/components/auth.js Просмотреть файл

@@ -309,7 +309,8 @@ module.exports = {
const emBeforeLogin = {
obj: this.obj,
success: true,
msg: null
msg: null,
username
};
await eventEmitter.emit('onBeforeLogin', emBeforeLogin);
if (!emBeforeLogin.success) {
@@ -387,7 +388,8 @@ module.exports = {
const emBeforeRegisterAccount = {
obj: this.obj,
success: true,
msg: null
msg: null,
username: msg.data.username
};

await eventEmitter.emit('onBeforeRegisterAccount', emBeforeRegisterAccount);


Загрузка…
Отмена
Сохранить