lobanz
New member
First addon. Read the docs, watched the videos. Loving it so far.
Need to run some code in my addon when the user registration is complete. This code needs to remove (or blank out) a custom user field that was required at registration (and validated via a Validator in my addon) (or blank it out). And then modify a custom entity after the user registration is complete. The custom field and its Validator are working swimmingly.
So it looks like I can do this via the Class Extension mechanism by overriding XF\Pub\Controller\Register.finalizeRegistration(). I have this working in that I can get it to stop at a breakpoint in finalizeRegistration() my subclass.
My questions are:
'Preciate it!
Need to run some code in my addon when the user registration is complete. This code needs to remove (or blank out) a custom user field that was required at registration (and validated via a Validator in my addon) (or blank it out). And then modify a custom entity after the user registration is complete. The custom field and its Validator are working swimmingly.
So it looks like I can do this via the Class Extension mechanism by overriding XF\Pub\Controller\Register.finalizeRegistration(). I have this working in that I can get it to stop at a breakpoint in finalizeRegistration() my subclass.
My questions are:
- Is this the right place to do it?
- Am I going about it all wrong and there is a better way to do it?
- Where would be a good place to put code when the account registration is approved?
'Preciate it!