I run a drupal 6.0. It has a number of different user roles and I want to 2 URL links to allow users to register with a specific role. To clarify what I mean:
- I have the user roles “Buyer” and “Seller”
- I have used the Drupal profile module to add 2 profile fields: “Location” and “Company”
- I have installed and configured the Profile Roles module so the field Company is only shown to Buyer and the field Location is only shown to Seller
That all works fine but I would like to add 2 buttons to my home page
- “Buyers register here”
- “Sellers register here”
What I would like that if a Buyer clicks on their link – I can determine from the URL:
- This is a Buyer who registers
- When this users account is created – it’s automatically assigned the Buyers Role so the correct profile fields are shown
Any suggestions on how to accomplish this would be greatly appreciated.
I suggest the Auto Assign Role module which is used to let users pick their own role when registering, either with a form or via a URL argument. So if you have a role called buyer, then make your Buyer button link to /user/register/buyer and the buyer role will be assigned to users registering via that URL. What I can’t confirm is how this works with Profile Role.