Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verification email is sent even if verified is checked in UI #10158

Open
tylkomat opened this issue Dec 24, 2024 · 0 comments
Open

Verification email is sent even if verified is checked in UI #10158

tylkomat opened this issue Dec 24, 2024 · 0 comments
Labels
status: needs-triage Possible bug which hasn't been reproduced yet

Comments

@tylkomat
Copy link

tylkomat commented Dec 24, 2024

Describe the Bug

When creating a user and auth.verify is true on the collection, the verification email is sent despite having verified checked in UI. The verificationToken is also generated.

Missing check for resultWithLocales._verified or !verificationToken: https://github.com/payloadcms/payload/blob/main/packages/payload/src/collections/operations/create.ts#L256

Missing Check for result._verified === true: https://github.com/payloadcms/payload/blob/main/packages/payload/src/collections/operations/create.ts#L298

Link to the code that reproduces this issue

https://github.com/tylkomat/payload/tree/bug-verification-email

Reproduction Steps

  1. set verify to true on user collection
  2. create a new user via UI, check verified checkbox, hit save
  3. CLI shows the message: INFO: Email attempted without being configured. To: ...

Which area(s) are affected? (Select all that apply)

area: core

Environment Info

Binaries:
  Node: 20.12.2
  npm: N/A
  Yarn: N/A
  pnpm: N/A
Relevant Packages:
  payload: 3.10.0
  next: 15.0.4
  @payloadcms/db-mongodb: 3.10.0
  @payloadcms/graphql: 3.10.0
  @payloadcms/next/utilities: 3.10.0
  @payloadcms/richtext-lexical: 3.10.0
  @payloadcms/translations: 3.10.0
  @payloadcms/ui/shared: 3.10.0
  react: 19.0.0
  react-dom: 19.0.0
Operating System:
  Platform: win32
  Arch: x64
  Version: Windows 11 Pro
  Available memory (MB): 15125
  Available CPU cores: 12
@tylkomat tylkomat added status: needs-triage Possible bug which hasn't been reproduced yet validate-reproduction labels Dec 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
status: needs-triage Possible bug which hasn't been reproduced yet
Projects
None yet
Development

No branches or pull requests

1 participant