User create / registeration queue refactor (#13905)

* feat: add options parameter to User.create

add emailVerification: ('send'|'verify'|'skip') param to User.create to control email verification

add a new method User.createOrQueue(). store options that will be passed to User.create() when registration is accepted in _opts

If there is no password passed to registration queue(SSO register) don't store hashedPassword

removed the isFirstUser hack in user.create, when creating the admin user in install.js passing `emailVerification: 'verify'` to immediately verify the email, same with all the hacks in tests

auth: if an SSO plugin sends back an info object, redirect to root and display the message

* refactor: make function private

* refactor: destruct return

* test: fix flag test

* test: group tests

* feat: show ssoIcon if available in register queue

* add icon/title
This commit is contained in:
Barış Uşaklı
2026-01-19 18:40:48 -05:00
committed by GitHub
parent 6383bb58e9
commit e2e1744824
17 changed files with 176 additions and 112 deletions

View File

@@ -4,8 +4,8 @@ const async = require('async');
const assert = require('assert');
const nconf = require('nconf');
const request = require('../src/request');
const db = require('./mocks/databasemock');
const request = require('../src/request');
const categories = require('../src/categories');
const topics = require('../src/topics');
const user = require('../src/user');