Multiple roles
Grooviak - August 13, 2007 - 18:18
| Project: | Role Control |
| Version: | 5.x-1.x-dev |
| Component: | Code |
| Category: | feature request |
| Priority: | normal |
| Assigned: | elliot |
| Status: | postponed |
Jump to:
Description
It would be nice, if there was the possiblity to have more than one role, which the user can choose. I think for a workaround the module could be copied x times (could it?). But i think it would be a more proper solution to allow this by this by the module.

#1
I'll look into doing this, it shouldn't be very difficult, just change the controlled role to a multi select box and have it show check boxes for each role on the user account page.
#2
Grooviak,
On further inspection, this would mean completely re-writing the module to allow the admin to add roles (something like how the Profile module allows you to add variables), and to change the admin screen to list the roles. It would also mean moving the settings out of the standard drupal variable table into its own table. While none of this is extremely difficult, it isn't something I have time for currently. Duplicating the module won't allow this behavior because drupal (correctly) will error since functions would be defined twice and the data would be stored in the same space.
If you or anyone would like to make a stab at it I would be happy to test it and add it to the CVS.
-Elliot
#3
elliot,
Thank you very much for taking a look on this. I think I'm to weak in PHP development to rewrite the module. But it would be nice, if someone other who could need this funcionality would do this. Or maybe in a few month I'll be able to... :)
#4
has anyone added this feature for multiple roles yet? I'd like users to choose whether they are employers, employees, etc. upon registration (or even have the capability of choosing their role on the "my account" page).
thanks,
andrew
#5
I haven't added this yet as it isn't a feature we need and will require a complete re-write. I'll keep it in mind though. If anyone would like to take a stab at it I'm happy to open up another branch for someone to work on.
-Elliot
#6
As a suggestion for this functionality, though it certainly doesn't look as pretty, you can use the Role Delegation module - that paired with inability to access user profiles should do the trick - albeit it is a work-around, but it gets the job done.