members
members copied to clipboard
Activation suggestion
I think it would be cool to have another out-of-the-box activation event where you supply the newly registered user with a url, most likely in an email, and it automatically activates the user without entering form information.
So the url would contain the user ID and the activation code. There would be a hidden form on the page that is autopopulated by those params and submits as soon as the user lands on the page. If successful, it redirects you to a specified url or displays a success message, and if unsuccessful, it would display the error.
This, to me, seems like a simple event to write and wouldn't be hard for a developer to do. But for designers wanting this, then a pre supplied option would be ideal.
Just an idea!
Although, you could probably just have the form submit on pageload with javascript...so maybe a redundant idea.
An solution that's a little more foolproof could be detecting based off the URL (similar to how JIT reserves /image/
) and if successful, redirects to a location specified by 'x', where 'x' might be:
- A parameter in the URL
- A setting in System > Preferences
- Set on the Activation event
One client required me one-click activation from the activation email: to achieve that I just changed the activation event to trigger on both post and get requests, replacing $_POST with $_REQUEST. Then in the activation email I pass a link with email, activation code and action name, and that seems to work for me...
workaround to activate a user via click email-link
-
change $_POST with $_REQUEST
-
in email template the link-should have the following format
{$root}/activate/?fields[activation]={/data/member-by-id/entry/activation/code}&fields[email]={/data/member-by-id/entry/email}&action[members-activate-account]=submit&redirect={$root}/my-account