[web] throw early in UserCreator.createNewUser with missing analyticsId (#34664)

* [web] throw early in UserCreator.createNewUser with missing analyticsId

* [migrations] rerun back-fill of db.users.analyticsId

GitOrigin-RevId: eabf16326192fca4dbea00ad643cee4315c426c6
This commit is contained in:
Jakob Ackermann
2026-06-17 08:06:59 +00:00
committed by Copybot
parent 6bc9f1dae4
commit d44e862a0c
11 changed files with 117 additions and 34 deletions
@@ -14,6 +14,7 @@ import OError from '@overleaf/o-error'
import fs from 'node:fs'
import Path from 'node:path'
import { fileURLToPath } from 'node:url'
import crypto from 'node:crypto'
const MONOREPO = Path.dirname(
Path.dirname(Path.dirname(Path.dirname(fileURLToPath(import.meta.url))))
@@ -42,6 +43,7 @@ async function createUser(
const user = await UserRegistrationHandler.promises.registerNewUser({
email,
password: PASSWORD,
analyticsId: crypto.randomUUID(),
})
userId = user._id
} catch (err) {