fix: email update bug (#10306)
Co-authored-by: Keith Williams <[email protected]>
This commit is contained in:
1 parent
cdb78b686b
commit
4f488be654
5 files changed
+24
-4
No files matched your search
@@ -98,6 +98,11 @@ export const updateProfileHandler = async ({ ctx, input }: UpdateProfileOptions)
|
||||
});
|
||||
}
|
||||
}
|
||||
const hasEmailBeenChanged = userToUpdate.email !== data.email;
|
||||
|
||||
if (hasEmailBeenChanged) {
|
||||
data.emailVerified = null;
|
||||
}
|
||||
|
||||
const updatedUser = await prisma.user.update({
|
||||
where: {
|
||||
|
||||
Reference in new issue
Block a user