News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

Limit membergroup to primary only?

Started by hiennhan12, September 25, 2018, 11:52:21 PM

Previous topic - Next topic

hiennhan12

I'm curious if anybody has a way of limiting a membergroup so that it can only be assigned as a primary?

We run with five primary membergroups (not including admins) and I'm wanting to give people the option to switch between them at will, however if I simply make them 'Free' so they can pick and choose, they may not think to remove the previous membergroup association which could run into problems later on where we use checks for which membergroups people are in.

Ideally, if a membergroup could be set to 'primary only' then selecting a new 'primary only' membergroup would automatically remove them from their current membergroup. I'm just not sure if it's doable, or more accurately, if there's an easy way to do it.

Arantor

There's not really a good way to do this, it's really not how the system is designed.

What's the use case for this? What are the different groups and why would users change between them? Could it make sense for groups to be additive rather than exclusive?

Diego Andrés

It's doable but not nice.
You could also change the conditionals of wherever you use this to prevent it from looking into the secondary/additional groups, that's only if you don't have any other use of MORE additional groups than these, or if these privilegies aren't used everywhere in your forum.

SMF Tricks - Free & Premium Responsive Themes for SMF.

Advertisement: