Member Extension - Post Activation Action
This is an open discussion with 3 replies, filed under Extensions.
Search
Not sure if this is the best way to go about it but this is how I did it.
Copied event.members_activate_account.php
to workspace/events/event.members_activate_account_extra.php
Created new event to be called. Set it's priority to 1 so it's called after event.members_activate_account_extra.php
Set $_POST['action']['members-post-activation'] = 'Submit';
in event.members_activate_account_extra.php
to trigger event
This feels a little hacky and I'm sure there are better ways of doing it, but this worked for.
The cleanest way would be to create your own extension and listen to delegates fired by the extension. Specifically, you'll want to subscribe to EventFinalSaveFilter
and check the event object is an instance of eventMembers_Activate_Account
(or check the returned xml node name).
Thanks for tip alpacaaa, I'll look into that.
Create an account or sign in to comment.
If I wanted to carry out further processing upon a successful activation should I edit the built in event
event.members_activate_account.php
or is there something I can hook onto?Essentially I need to trigger another event if the member successfully activates the account.