This repository provides an example project that uses the SilverStripe Member Email Verification Module so that Members are required to validate their email address before they can log in.
To set up this example project:
git clone https://github.com/jordanmkoncz/silverstripe-memberemailverification.git
cd path/to/cloned/repository
composer install
Then create your _ss_environment.php
file to specify the typical settings (database, environment, etc.).
- In
mysite/_config/config.yml
we define theEmail.admin_email
setting, which is the email address that verification emails are sent from. - In
mysite/_config/routes.yml
we define a route to theProfileController
. - In
mysite/code/ProfileController.php
we define a Controller that provides aregister
action to allow new users to register via theRegisterForm
, and averify
action that displays a message to users who have just registered to tell them they need to verify their email address. - In
themes/simple/templates/Layout/ProfileController_register.ss
we define the template for theProfileController
register
action. - In
themes/simple/templates/Layout/ProfileController_verify.ss
we define the template for theProfileController
verify
action.