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!

Comments

scotthenning’s picture

Title: User Roles » Limit 1 Role Per User in Group
somebodysysop’s picture

No, there is nothing like that in place. If someone wants to code something up, I'm happy to look at it.

scotthenning’s picture

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!

somebodysysop’s picture

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.

somebodysysop’s picture

Status: Active » Postponed
sun’s picture

Status: Postponed » Closed (won't fix)

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.