Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
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.
Comments
Comment #1
Anonymous (not verified) CreditAttribution: Anonymous commented+1
Comment #2
ben kuper CreditAttribution: ben kuper commentedI 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.
Comment #3
andrenoronha CreditAttribution: andrenoronha commentedI tried that with the path but it didn't work...
The checkboxes are still shown and with no one checked.
Comment #4
joray.open CreditAttribution: joray.open commentedSubscribe.
Very good, I hope this path, I can fill in and role-related profiles. Thank you
Comment #5
joray.open CreditAttribution: joray.open commentedI hope it to work better with Profiles2
I want it to work better with Profiles2!
I wait for it to work with Profiles2!
Comment #6
mike.davis CreditAttribution: mike.davis commentedPatch 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.
Comment #7
mike.davis CreditAttribution: mike.davis commentedThis 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?
Comment #8
mike.davis CreditAttribution: mike.davis commentedWith 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.
Comment #9
mike.davis CreditAttribution: mike.davis at Deeson commentedAs there has been no response on this, I am going to push this back to the 7.x-2.x branch so that we can get an official 7.x-1.x release out.