Can anyone help regarding this topic please?
I tried using rules to call authorization extension API to add user to a role, the problem with this method is that user who just register will not immediately get the access, instead the role will only appear after the 2nd login.
I also tried using hooks, I tried both post-registration and pre-registration.
For post registration, I don’t know why but my script to use the authorization extension API seems not executed properly. I can see from the log the it is indeed calling the API to assign the role to the user, but the user permission is not updated.
For pre registration, I can’t use it because in pre-registration script user_id does not exist, and this is needed for calling auth extension API for adding user to roles.