From 62aed4bb9b559d58e1117b8c0c0342350448be18 Mon Sep 17 00:00:00 2001 From: ali ebrahimi Date: Tue, 20 Aug 2024 16:59:34 +0330 Subject: [PATCH] reset email confirmation only when email changes --- src/resolvers/userResolver.ts | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/resolvers/userResolver.ts b/src/resolvers/userResolver.ts index efbb98223..a1947e841 100644 --- a/src/resolvers/userResolver.ts +++ b/src/resolvers/userResolver.ts @@ -189,12 +189,12 @@ export class UserResolver { emailConfirmationSent: false, emailConfirmationSentAt: null, }); + dbUser.emailConfirmed = false; + dbUser.emailConfirmedAt = null; + dbUser.emailConfirmationSent = false; + dbUser.emailConfirmationSentAt = null; + dbUser.email = email; } - dbUser.emailConfirmed = false; - dbUser.emailConfirmedAt = null; - dbUser.emailConfirmationSent = false; - dbUser.emailConfirmationSentAt = null; - dbUser.email = email; } if (url !== undefined) { dbUser.url = url;