Skip to content

Commit

Permalink
Merge pull request #1875 from Giveth/fix/email_verification_check
Browse files Browse the repository at this point in the history
Fix/Email verification only for verified users
  • Loading branch information
kkatusic authored Nov 25, 2024
2 parents 5d7a1d0 + 594842f commit 04b3a19
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/resolvers/userResolver.ts
Original file line number Diff line number Diff line change
Expand Up @@ -288,9 +288,9 @@ export class UserResolver {
);
}

// Check do we have an email already in the database
// Check do we have an email already in the database and is it verified
const isEmailAlreadyUsed = await User.findOne({
where: { email: email },
where: { email: email, isEmailVerified: true },
});

if (isEmailAlreadyUsed && isEmailAlreadyUsed.id !== user.id) {
Expand Down

0 comments on commit 04b3a19

Please sign in to comment.