I would like to implicitly assign a role whenever a user registers via the lock API, however I am struggling to pass any sort of data/params across to the Post Registration hook - is this even possible?
I tried the following, but params seem to be limited to rules:
If I can access the params within the hook body I can then set the role using the management API. I know this is possible using a rule but I would prefer to handle this in the Post Reg hook.
A user registration through Lock would translate into an API call into the signup endpoint. Can you clarify how may possible ways you have in your system for that signup endpoint to be called? The reason to ask is that you may be able to differentiate between them through other means and still be able to assign a default role only to the subset of users you need.
As this topic is related to Rules - Hooks - Actions and Rules & Hooks are being deprecated soon I’m excited to let you know about our next Ask me Anything session in the Forum on Thursday, January 18 with the Rules, Hooks and Actions team on Rules & Hooks and why Actions matter! Submit your questions in the thread above and our esteemed product experts will provide written answers on January 18. Find out more about Rules & Hooks and why Actions matter! Can’t wait to see you there!