Skip to content

Placement of triggers for EVENT_BEFORE_VERIFY_EMAIL and EVENT_AFTER_VERIFY_EMAIL events #16825

Closed Answered by brandonkelly
jamiepittock asked this question in Q&A
Discussion options

You must be logged in to vote

verifyEmailForUser() doesn’t actually handle email verification; it just updates the user record’s email with the unverifiedEmail value and clears out unverifiedEmail.

There are two routes that actually handle email verification:

  • users/set-password – for reset-password emails
  • users/verify-email – for activation emails

Each of those actions call UsersController::_processTokenRequset() internally, where token validation (and thus, email address validation) take place. So that’s where the events get fired.

because it might not be due to email verification.

Not sure what you mean by that; in both of the above cases, it’s for verifying that the user does in fact have access to their email …

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by brandonkelly
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants