Email Account Activation with Token #7126
spaceageliving
started this conversation in
General
Replies: 1 comment
-
Following up on this in the event a fellow traveller lands on this--the answer is yes, using the Statamic User object there is a method to send a token-enabled email for account verification. I dispatch an event in a register() method in a UserController in Laravel land that gets handled like so:
Works great! Pass the $user in the event. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
I'm trying to have a new user activation process which uses the User:Register_Form tag, but which also implements the Email Invitation with token that occurs when creating a user manually in the control panel.
Is this possible?
The idea being that I want the additional hurdle of the newly-registered user accessing the email sent to the given email address and performing the activation by clicking on the embedded link with token in the email before logged_in status is reached the first time. As the Register_Form tag works now, anybody can put in any validly-formed email address and immediately be logged into the site--not a desirable situation when, for example, there is a comment forum with potential for spamming etc.
If this is not possible "out of the box" with Statamic, would the recommended approach be to roll your own routes/controller for new user activation, and use Statamic's User class to create the user? The Control Panel activation process (and User model) includes generating a Token and validating it when the user clicks the activation link--can this be leveraged in a "roll your own" approach?
Any help/ideas greatly appreciated.
Beta Was this translation helpful? Give feedback.
All reactions