Simple Machines Community Forum

SMF Support => SMF 2.0.x Support => Topic started by: rcane on August 29, 2024, 11:21:58 AM

Title: Can you set the default member group at account approval?
Post by: rcane on August 29, 2024, 11:21:58 AM
Morning,

Is it possible to set a default membergroup when an account is approved?

I have some needs now that have to drop folks in a more restricted group until I get some data from them. 

It would be nice to have that step automated—-also to help mitigate overlooking it.
Title: Re: Can you set the default member group at account approval?
Post by: Aleksi "Lex" Kilpinen on August 29, 2024, 11:24:37 AM
Yes, it's called "regular members". The default group all new members belong to. Only problem is, if you haven't planned for this in advance, you probably also have a lot of old members that are simply regular members too.
Title: Re: Can you set the default member group at account approval?
Post by: GL700Wing on August 29, 2024, 02:03:54 PM
Quote from: rcane on August 29, 2024, 11:21:58 AMIs it possible to set a default membergroup when an account is approved?
@rcane The Default Membergroup (https://custom.simplemachines.org/index.php?mod=1804) mod might help you do what you want - it assigns all new members to a specific membergroup upon registration.
Title: Re: Can you set the default member group at account approval?
Post by: rcane on August 29, 2024, 03:13:33 PM
Quote from: Aleksi "Lex" Kilpinen on August 29, 2024, 11:24:37 AMYes, it's called "regular members". The default group all new members belong to. Only problem is, if you haven't planned for this in advance, you probably also have a lot of old members that are simply regular members too.

Nope, mine is empty.  I move people at registration into one of several groups.  One of those groups is very restrictive.  I could:

1.   just mimic the permissions of 'that' group inside regular members and then not worry about it--letting everyone drop into regular members until I shift them around; or

2.   find out where id_group is assigned as "0" to a registrant and temporarily comment that out to whatever id_group # I'm interested in.

Q: is it possible to rename regular members for my benefit on my side, as I know it doesn't show on a person's profile when they're viewing it (to my knowledge)?
Title: Re: Can you set the default member group at account approval?
Post by: rcane on August 29, 2024, 03:18:24 PM
Quote from: GL700Wing on August 29, 2024, 02:03:54 PM
Quote from: rcane on August 29, 2024, 11:21:58 AMIs it possible to set a default membergroup when an account is approved?
@rcane The Default Membergroup (https://custom.simplemachines.org/index.php?mod=1804) mod might help you do what you want - it assigns all new members to a specific membergroup upon registration.

Yeah that's clever.  I can see where it's doing its "schtick".  Thanks.
Title: Re: Can you set the default member group at account approval?
Post by: Arantor on August 29, 2024, 06:33:04 PM
Quote from: rcane on August 29, 2024, 03:13:33 PMfind out where id_group is assigned as "0"

It's not assigned as such, the database itself knows this is the default value and uses it.

Better not to mess with this and just use permissions to handle it. Remember: everyone is also in a post count group if you haven't already docked those permissions.
Title: Re: Can you set the default member group at account approval?
Post by: rcane on August 30, 2024, 12:30:56 PM
Quote from: Arantor on August 29, 2024, 06:33:04 PM
Quote from: rcane on August 29, 2024, 03:13:33 PMfind out where id_group is assigned as "0"

It's not assigned as such, the database itself knows this is the default value and uses it.

Better not to mess with this and just use permissions to handle it. Remember: everyone is also in a post count group if you haven't already docked those permissions.

I don't use the post counts, but I did test out that mod on a test forum i have on a sandbox domain.  It seemed to work fine--dumping new registrants into the desired group, or it would send them to the default group if the mod's new field (on the registration admin panel) is simply left blank.


Regarding going the permissions route:

"regular members" has about 8 groups that inherit its permissions. 

If I wanted to just tighten the permissions of regular members (so new folks would drop there first without using a mod), what kind of work flow would you recommend to accomplish this?

My first though was just to mimic 'regular members' to a new 'general members'.  Then manually change each of those 8 groups over to 'general members'.   Finally, tighten 'regular members' to become the default 'strict' group.
Title: Re: Can you set the default member group at account approval?
Post by: Aleksi "Lex" Kilpinen on August 30, 2024, 12:36:15 PM
Your first thought actually sounds pretty good to me - It's easy to copy permissions to a new group, it's also fairly easy to edit the existing groups to now follow this new permission set. It should work. And no manual moving of users between groups needed there.
Title: Re: Can you set the default member group at account approval?
Post by: rcane on August 30, 2024, 12:42:11 PM
Quote from: Aleksi "Lex" Kilpinen on August 30, 2024, 12:36:15 PMYour first thought actually sounds pretty good to me - It's easy to copy permissions to a new group, it's also fairly easy to edit the existing groups to now follow this new permission set. It should work. And no manual moving of users between groups needed there.

Looking at permissions > edit profiles > new profiles [create]:

Since 'regular members' is where folks would reside by default--is 'default' the profile I am looking for to copy to a new permission profile called "general user"?
Title: Re: Can you set the default member group at account approval?
Post by: Aleksi "Lex" Kilpinen on August 30, 2024, 12:47:08 PM
I would start by creating a membergroup called General Members. You need not add any users to it, you just use it to create a permission set within the existing permission profile. Make sure this new group does not inherit permissions from any other group. You can select "Based off regular members", if you do - you can skip the next step (copying permissions). Copy any board access permissions from the existing regular members group as well.

Then go to Admin -> Members -> Permissions -> General Permissions, and use the tools at the bottom to set the permissions for the new group: Set permissions like this group -> Regular members, if you did not already base the permissions off of regular members.

Then continue to edit the existing groups permission inheritance, by editing the membergroups.

Edited to add: Just realized, I'm looking up the process in 2.1, if you are using 2.0 this might not be exactly the same - but the basics should still work similarly.
Also, I would suggest taking a DB backup before starting - just in case something goes horribly horribly wrong while working on the permissions.
Title: Re: Can you set the default member group at account approval?
Post by: rcane on August 30, 2024, 01:03:48 PM
Quote from: Aleksi "Lex" Kilpinen on August 30, 2024, 12:47:08 PMI would start by creating a membergroup called General Members. You need not add any users to it, you just use it to create a permission set within the existing permission profile. Make sure this new group does not inherit permissions from any other group. You can select "Based off regular members", if you do - you can skip the next step (copying permissions). Copy any board access permissions from the existing regular members group as well.

Then go to Admin -> Members -> Permissions -> General Permissions, and use the tools at the bottom to set the permissions for the new group: Set permissions like this group -> Regular members, if you did not already base the permissions off of regular members.

Then continue to edit the existing groups permission inheritance, by editing the membergroups.

Edited to add: Just realized, I'm looking up the process in 2.1, if you are using 2.0 this might not be exactly the same - but the basics should still work similarly.
Also, I would suggest taking a DB backup before starting - just in case something goes horribly horribly wrong while working on the permissions.


Right.  "like" or "based off of" so that changes to regular members one systemically changed "general members" later. 

clever.   thank you.
Title: Re: Can you set the default member group at account approval?
Post by: Illori on August 30, 2024, 01:04:45 PM
Quote from: rcane on August 30, 2024, 12:42:11 PM
Quote from: Aleksi on August 30, 2024, 12:36:15 PMYour first thought actually sounds pretty good to me - It's easy to copy permissions to a new group, it's also fairly easy to edit the existing groups to now follow this new permission set. It should work. And no manual moving of users between groups needed there.

Looking at permissions > edit profiles > new profiles [create]:

Since 'regular members' is where folks would reside by default--is 'default' the profile I am looking for to copy to a new permission profile called "general user"?

this would copy your existing permissions to a new profile from my understanding then you can modify them from there.

also even if you dont use the post count based groups they are still there and in use, everyone has to be in 2 groups a primary and post count group at minimum.
Title: Re: Can you set the default member group at account approval?
Post by: rcane on August 30, 2024, 01:17:16 PM
Quote from: Aleksi "Lex" Kilpinen on August 30, 2024, 12:47:08 PMI would start by creating a membergroup called General Members. You need not add any users to it, you just use it to create a permission set within the existing permission profile. Make sure this new group does not inherit permissions from any other group. You can select "Based off regular members", if you do - you can skip the next step (copying permissions). Copy any board access permissions from the existing regular members group as well.

Then go to Admin -> Members -> Permissions -> General Permissions, and use the tools at the bottom to set the permissions for the new group: Set permissions like this group -> Regular members, if you did not already base the permissions off of regular members.

Then continue to edit the existing groups permission inheritance, by editing the membergroups.
I would suggest taking a DB backup before starting - just in case something goes horribly horribly wrong while working on the permissions.


I backup via cPanel, the entire smf db, but does is there a preference to that or the tool inside smf?
Title: Re: Can you set the default member group at account approval?
Post by: Aleksi "Lex" Kilpinen on August 30, 2024, 01:19:08 PM
Always a better idea to use tools made for the purpose, such as your host provided backups. The backup options within SMF are an emergency option only, not to be relied on regularly.