View Full Version : How do you keep members from choosing more than one group?
ThePiston
06-14-2006, 06:45 PM
I have a group system that should only allow members to join one group at a time - how do you do that?
tgreer
06-14-2006, 06:59 PM
I see no setting for this. You'll have to code a plugin. Looking at "profile.php", the "joingroup" code starts at line 1999. There is a hook at line 2052, the hook is called "profile_joingroup_unmoderated". That comes right before the $userdata->save datamanager call, so presumably you could code a plugin that does a query, checks to see if the user is a member of any other usergroup, and if so, do a redirect to an error page so that the codepath never reaches the "save".
ThePiston
06-14-2006, 07:10 PM
i'm not too hip on self-coding... has anyone already done this?
tgreer
06-14-2006, 07:27 PM
This is the general modification forum, so it's assumed you want to try your hand at modding and just need some general info to point you in the right direction.
If that's not what you intend, then you should create a thread in the Custom Requests forum.
vBulletin® v3.8.12 by vBS, Copyright ©2000-2025, vBulletin Solutions Inc.