Limit 1 Role Per User in Group
scotthenning - February 19, 2009 - 07:14
| Project: | OG User Roles |
| Version: | 6.x-1.3 |
| Component: | Miscellaneous |
| Category: | support request |
| Priority: | normal |
| Assigned: | Unassigned |
| Status: | won't fix |
Jump to:
Description
Is there a way to restrict the admins of an organic group to only assigning 1 role per user? I.E. my groups represent teams, and each team member can only have 1 position (role) at a time...
Thanks!

#1
#2
No, there is nothing like that in place. If someone wants to code something up, I'm happy to look at it.
#3
Can you point me to the code in the module where it lists the roles that can be assigned to a user? I am thinking I can do a sloppy work-around if I create a drop-down or radio-buttons instead of checkboxes...
Thanks!
#4
You'll need to add a setting in hook_settings to determine the number of group roles allowable per group.
Next, look for:
INSERT INTO {og_users_roles}...This is what must be modified to only insert IF the number of group roles allowable is not exceeded.
#5
#6
With the rise of the rewritten OGUR 4.x for Drupal 6, in which many unrelated features of OGUR were removed, and nearing a release of Drupal 7, I'm closing down old issues.