Restrict users to one user created Group

12 years 9 months ago #109414 by m_13
I would like to be able to a) automatically add new users to one centrally created group based on a drop down on the registration form and b) restrict users to one user created group.

I'm developing a community where people can track their progress on virtual walks (using a pedometer).

I need to generate Google Maps based on group membership to that users can view a map with just their Group on. However, if they belong to multiple user created groups then they could appear on lots of maps which will become difficult to manage.

Thanks for any help offered :)

Please Log in to join the conversation.

12 years 8 months ago #110300 by bertm
I am interested in a feature like this - but for me its more like teams. Each member can only be on one, by invitation. How could this be managed? The "invitation only" part is easy, but only "one group per member" is the problem.

Please Log in to join the conversation.

12 years 8 months ago #111401 by bertm
This is a hack that limits users to be able to join only one group. This is useful for TEAMs, where you can join only one, but not other TEAMs. In my case I also have one OPEN group that is not a TEAM (useful for people to preview what goes on inside a group, get info, etc).

Changes are commented with "BKM" File is groupjive.html.php v1.8.b4 Only about 5 lines are modified.

The hack is hard coded to allow ALL users to become a member of GroupID=1 (my demo group), but as soon as they request membership in any group other than GroupID=1, the JOIN NOW buttons for all other groups become inaccessible. Admins can still over-ride this by "forcing" someone into additional groups.

Perhaps a back end option could be created called "Mutually Exclusive Groups" with a list of IDs that take on this behavior, with all other groups being unlimited. Or perhaps it should be the opposite - all groups are "Mutually exclusive" except a short list of universally open groups.


(I have attached the file)

Attachment not found

(( oops, there is a bug. if the user joins a mutually exclusive group first, he is locked out of GROUP#1 as well. will tweak later. ))

Post edited by: bertm, at: 2009/09/17 14:27

Please Log in to join the conversation.

12 years 8 months ago #111424 by m_13
Thanks bertm for the hack. I'll give it a go.

You are correct though, what I want are mutually exclusive teams so you have a choice of teams to join - like the four houses in Harry Potter! - and once you select one then that's the team you are in and you can join no other.

Restricting to one team is a good start though :)

Please Log in to join the conversation.

Moderators: beatnantkrileon
Time to create page: 0.158 seconds

Facebook Twitter LinkedIn