Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: sangham.net on November 09, 2013, 03:34:16 AM

Title: "Problem" with setting the primare membership for members
Post by: sangham.net on November 09, 2013, 03:34:16 AM
Dear SMF supporter and friends,

Just had the case that a certain member was not able to change his primary membership group. Since I have the same group memberships I am a little confused, as I have no problems with it.

Under the action/page "index.php?action=profile;area=groupmembership;u=xxx" he has not displayed the possibility to chose, while I have this.

Attached two screen shots.

I am sure it's just a setting issue, but I have currently no idea what the reason could be.


1st is my display for the same action/page
2nd is the members display

Thanks for any idea in advanced!

[SMF 2.0.4]
Title: Re: "Problem" with setting the primare membership for members
Post by: Oldiesmann on November 09, 2013, 12:36:20 PM
The problem is because of the "Global Moderator" group. Because that's a group that can only be assigned by admins, the user is unable to change their primary group.
Title: Re: "Problem" with setting the primare membership for members
Post by: sangham.net on November 09, 2013, 01:48:16 PM
Thanks a lot, Oldiesmann. Maybe I have overseen something. I thought that I have exactly the same memberships like him.

I try to check that.

Or did I missunderstood something? Did you mean that exept the global mod and the admin, users generally are not able to change the primary group? But why I am able... Have to prove that, total unsure.
Title: Re: "Problem" with setting the primare membership for members
Post by: Oldiesmann on November 09, 2013, 02:07:06 PM
Admins don't have any restrictions on changing their primary group, since they're administrators - they can do whatever they want.

There are four types of "regular" (non-post-based) groups in SMF:
Free - users can join and leave at will
Restricted - users have to request to join the group (requests can be approved by an administrator or group moderator)
Protected - users must be added to the group by a group moderator or administrator
Private -  users can only be added to the group by an administrator

If a user's primary group is a "private" or "protected" group, they're not able to change their primary group. The "Global Moderators" group is "private" by default, so users can't change their primary group if their current primary group is "Global Moderator".

There are a few options if you want them to remain in the Global Moderator group and still be able to change their primary group:
1. Change "Global Moderator" to a "Restricted" group (so users can request to join it)
2. Go into the user's profile, remove their primary group and set Global Moderator as an additional group. This would give them the same permissions, but SMF would not show them as a Global Moderator anywhere.
3. Modify the code to remove the restriction.
Title: Re: "Problem" with setting the primare membership for members
Post by: sangham.net on November 09, 2013, 08:03:30 PM
Thanks a lot Oldiesmann for the detail and careful explaining and advices.

Still a little curious, as I have no admin membership with this account but I guess I know a little more and can figure it all out.