Email confirmation on account creation
When a new user signs up, send them an email with a hashcode. The email should use a queue and an email event.
The hashcode should be a the user's guid and a timestamp.
The user account record in cassandra should contain the date the verification time stamp was sent.
When the user clicks the verification link with an email, the router should validate the hash with the user id and the timestamp. If the user clicked the URL within 48 hours, the hash is valid. The user's record should be updated with a "validated_at" timestamp and the User entity should expose an "isValidated()" function.
The 48 hours should be a default value in editable by helm / settings.php
Currently, we send out two emails after 2 hours of user signup. That mechanism should be replaced by this email which sends immediately. When they verify their email, then we can send either welcome_complete or welcome_incomplete based on their onboarding status
Follow the "Welcome_incomplete" template for now and use the existing header and footer structure, but change the text to:
@name,
Please take a moment to validate your email address. This helps us prevent spam and ensure users are real. Click this link and we'll know it's you.
<link and call to action button like the other template.>
Thanks,
The Minds Team
Be sure to provide the tracking information so we can identify the success of this email.
-
Send a verification hash email through the queue -
Use the existing email template and events mechanism. -
Extend the router to parse and validate the url clicked within a configurable value of 48 hours -
Replace the welcome emails with this one that sends immediately -
Send them the welcome_complete or welcome_incomplete on verficiation based on their onboarding progress -
Extend the commandline tool to allow easy testing of the email -
Write end to end tests for the events -
Provide phpunit tests for the new email and router callback