-
- const { user, account, videoChannel } = await createUserAccountAndChannelAndPlaylist({
- userToCreate: userToCreate,
- userDisplayName: body.displayName || undefined,
- channelNames: body.channel
- })
-
- auditLogger.create(body.username, new UserAuditView(user.toFormattedJSON()))
- logger.info('User %s with its channel and account registered.', body.username)
-
- if (CONFIG.SIGNUP.REQUIRES_EMAIL_VERIFICATION) {
- await sendVerifyUserEmail(user)
- }
-
- Notifier.Instance.notifyOnNewUserRegistration(user)
-
- Hooks.runAction('action:api.user.registered', { body, user, account, videoChannel })
-
- return res.type('json').status(204).end()