Fix crash when setting up user account

This commit is contained in:
Girish Ramakrishnan
2021-07-31 04:33:09 -07:00
parent e4ce1a9ad3
commit fee38acc40

View File

@@ -690,7 +690,7 @@ async function setupAccount(user, data, auditSource) {
await update(user, _.pick(data, 'username', 'displayName'), auditSource);
await setPassword(user, data.password); // setPassword clears the resetToken
await setPassword(user, data.password, auditSource); // setPassword clears the resetToken
const token = { clientId: tokens.ID_WEBADMIN, identifier: user.id, expires: Date.now() + constants.DEFAULT_TOKEN_EXPIRATION_MSECS };
const result = await tokens.add(token);