Adding many users to group

Arty

Well-known member
I have a forum where users are spread out over several custom groups that basically do the same thing: give access to hidden forums. I want to consolidate it in one big group (it will be secondary group) without removing old groups.

Is it as simple as cloning entries in user_group_relation table, replacing group id and setting is_primary to 0? Or do I need to do something else, like clear some cache or update some other table?
 
You can't manipulate group membership directly in the database as the permission sets won't be updated correctly.

The only way to do it is via the ACP.

If you have the skill, you could try copying the relevant portion of the code from the core files and creating your own add-on.
 
I'm talking about the permission_combination_id field in the xf_user table.

That value varies depending on the groups and permissions a user has, irrespective of whether a group has all permissions set to Not Set (No) or not.
 
That makes things more complex. Also I found secondary_group_ids row in users table that will need to be changed. Looks like I'll have to write a plug in and use api to change groups.
 
Top Bottom