refactor: move username check to createOrQueue

This commit is contained in:
Barış Soner Uşaklı
2026-01-19 22:43:39 -05:00
parent bb4fd31939
commit 37675689f8

View File

@@ -23,6 +23,7 @@ module.exports = function (User) {
}), null, true);
User.createOrQueue = async function (req, userData, opts = {}) {
User.checkUsernameLength(userData.username);
const queue = await User.shouldQueueUser(req.ip);
const result = await plugins.hooks.fire('filter:register.shouldQueue', { req, userData, queue });
if (result.queue) {