fix: respect email verification setting

This commit is contained in:
JetSprow
2026-04-29 15:20:23 +10:00
parent cf658ac026
commit 9f1bc9c0ce
4 changed files with 11 additions and 4 deletions

View File

@@ -26,7 +26,7 @@ export async function createUser(formData: FormData) {
const data = createUserSchema.parse(Object.fromEntries(formData));
const hashed = await bcrypt.hash(data.password, 12);
const user = await prisma.user.create({
data: { email: data.email, password: hashed, name: data.name || null, role: data.role },
data: { email: data.email, emailVerifiedAt: new Date(), password: hashed, name: data.name || null, role: data.role },
});
await recordAuditLog({
actor: actorFromSession(session),