-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
Add UserConfirmed workflow event for user email confirmation #16584
Add UserConfirmed workflow event for user email confirmation #16584
Conversation
…sfully confirms access to email address during registration process
…onfirmed-activity
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please also add this new change to the 2.0.0.md release notes.
Lastly, instead of using UserContext
I would suggest using a new ConfirmedUserContext
class that would inherit from UserContext
with one more property "ConfirmationType" This conformation type would have Email
or Phone
this way we can utilize this event to also confirm phone in the future. I would not add "Phone" in this PR, but I would add the type of the confirmation.
src/OrchardCore.Modules/OrchardCore.Users/Workflows/Activities/UserConfirmedEvent.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Workflows/Handlers/UserEventHandler.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/OrchardCore.Users.csproj
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/RegistrationController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/EmailConfirmationController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/EmailConfirmationController.cs
Outdated
Show resolved
Hide resolved
src/OrchardCore.Modules/OrchardCore.Users/Controllers/EmailConfirmationController.cs
Outdated
Show resolved
Hide resolved
Co-authored-by: Mike Alhayek <mike@crestapps.com>
…serEventHandler.cs Co-authored-by: Mike Alhayek <mike@crestapps.com>
Co-authored-by: Mike Alhayek <mike@crestapps.com>
Co-authored-by: Mike Alhayek <mike@crestapps.com>
Co-authored-by: Mike Alhayek <mike@crestapps.com>
…idpuplava/OrchardCore into davidpuplava/user-confirmed-activity
…ements; Add UserConfirmContext with UserConfirmationType enum
…onfirmed-activity
Congratulations on your first PR merge! 🎉 Thank you for your contribution! We're looking forward to welcoming other contributions of yours in the future. @all-contributors please add @davidpuplava for code. If you like Orchard Core, please star our repo and join our community channels. |
@github-actions[bot] I couldn't determine any contributions to add, did you specify any contributions? I've put up a pull request to add @davidpuplava! 🎉 |
Context
SaaS and newsletter websites send user registration emails to the registered email address to confirm user ownership of the entered email address. OrchardCore does this out of the box.
After a user confirms ownership of an email address, it is common to send a "Welcome to the site!" email welcoming the new user.
Rationale
While it may be possible to construct a timer workflow to determine when a user has confirmed their email address, a more straightforward approach is to trigger an event when a user confirms their email, which can then be used to send the email.
This PR intends to implement that.
Here is a GIF demonstrating that experience, and showing the new User Confirmed workflow event:
