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
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

scotthenning - February 19, 2009 - 07:15
Title:User Roles» Limit 1 Role Per User in Group

#2

SomebodySysop - February 19, 2009 - 17:34

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

#3

scotthenning - March 1, 2009 - 05:13

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

SomebodySysop - March 1, 2009 - 08:45

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

SomebodySysop - April 2, 2009 - 17:56
Status:active» postponed

#6

sun - December 5, 2009 - 18:11
Status:postponed» 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.

 
 

Drupal is a registered trademark of Dries Buytaert.