The user uses the web to navigate to a path and is assigned role(s) based on the path. Let's consider tokenizing this functionality this time around.
I added a auto-role selection feature on this issue patch : #983612: 'Allow user to choose' functionality doesn't work . It basically take the first arguments after user/register/ (e.g. user/register/myrole) and select it in the role selection list in the registration form, providing that it's an allowed role in the AAR Allow User to Choose Settings. Additionnally, the last patch provide an option in these settings to choose whether the role selection field is shown or hidden when a role argument is passed via url thus automatically selected.
I don't know much about tokens, so i don't really know if that fits your needs, but i guess tokens would be a more solid solution.
I tried that with the path but it didn't work...
The checkboxes are still shown and with no one checked.
Very good, I hope this path, I can fill in and role-related profiles. Thank you
I hope it to work better with Profiles2
I want it to work better with Profiles2！
I wait for it to work with Profiles2！
Patch from #971320: Administrator configures registration paths, each with customised role assignments enables registration via a defined URL to be assigned a specific roles(s), but does include any tokens so this would be good to look at including.
This is the last issue left for a 7.x-1.0 release.
What would need to be tokenised?
Presumably if the role name was a third parameter on the URL as Ben suggested (e.g. user/register/myrole) then you wouldn't need a token.
Is the purpose of a token to be for a role name so that any URL format can be defined using the role name token in it?
With no update on how this will work, I may have to think about moving this particular feature to a 2.x branch as this is currently blocking an offical release of the 7.x-1.x branch.
If I don't hear anything over the next month or so I will assume that this isn't currently needed and will move it so that we can at least move out of beta.
Drupal is a registered trademark of Dries Buytaert.