• This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn more.

Changing the default usergroup?

Brogan

XenForo moderator
Staff member
#2
Is there any particular reason you want to change the default user group?

Can't you rename the default Registered group and create a new one for your requirements?
 
#3
Is there any particular reason you want to change the default user group?

Can't you rename the default Registered group and create a new one for your requirements?
Because I already have a lump of people in the default usergroup, and instead of changing all of their groups to a new one, I was just going to make the new registrations a different one.
 
#5
All users should be in the Registered group as their primary group though.

The permissions system works best when it is set up like that.

It sounds to me you want some sort of user group promotion system?
http://xenforo.com/community/threads/trophypromo-trophy-based-user-group-promotions.9847/
Unfortunately I am using the user_group_id column to control access to a Minecraft server I run, so I have been changing people's groups to which ever they are. Should I be using secondary_group_ids instead?
 

Jake Bunce

XenForo moderator
Staff member
#7
You should respect the roles of the default groups. They are hard-coded and changing them will cause problems in the future.

See this post:

http://xenforo.com/community/thread...group-for-new-registrations.8022/#post-111413

Because I already have a lump of people in the default usergroup, and instead of changing all of their groups to a new one, I was just going to make the new registrations a different one.
Do you want to set different permissions for the existing users? Why do you want to separate existing users from new users? Maybe there is another solution.

Currently there is no "mass move" utility in the control panel so you would have to change each user individually.
 

Jake Bunce

XenForo moderator
Staff member
#8
Unfortunately I am using the user_group_id column to control access to a Minecraft server I run, so I have been changing people's groups to which ever they are. Should I be using secondary_group_ids instead?
How is that setup? Is the server info posted in a private forum? A secondary group will work well if you just need to restrict access to an area of the forum.
 
#9
So I want people to be able to register, but NOT access my Minecraft Server (Which queries a list of eligible people based off of their main user group). It looks like I will want to make it so it queries the secondary user group, since the primary should (always?) be set to the default group.
 

Jake Bunce

XenForo moderator
Staff member
#10
You can use this query to select from the list of secondary_group_ids:

Code:
SELECT *
FROM xf_user
WHERE FIND_IN_SET(2, secondary_group_ids)
Or if you want to cover both the primary and secondary groups:

Code:
SELECT *
FROM xf_user
WHERE FIND_IN_SET(2, secondary_group_ids)
OR user_group_id = 2
 
R

ragtek

Guest
#11
IMHO it wouldn't be hard to change it.
It's only 1x in the xenforo code.

xenforo model user
PHP:
public static $defaultRegisteredGroupId = 2;

//can be called with:
XenForo_Model_User::$defaultRegisteredGroupId