Changing User Group & Permissions directly in the database

Taxez

Member
Hey guys,

I need some assistance here. As the title suggests I want to change users groups and permissions for chunks of users trough a custom php script rather than using the xenforo backend to do it manually.

I have dug through the database and found xf_user to contain the fields (that i think) I want to change:

tM63w.png


Are these the only fields that the xenforo backend changes when I set the user group to "custom" rather than "registered" or are there more tables that are altered?

I would look for the php file that writes the groups/permissions but im still having trouble seeing through the entire xenforo system.
 
I have the exact same issue. I'm copying user ranks from a personally-managed database into a 10-rank structure on my forums. This is my SQL statement:

UPDATE xenforo.xf_user xu
LEFT OUTER JOIN roster.member rs
ON (xu.user_id = rs.forums_id)
SET user_group_id = 13, secondary_group_ids = "2,14,15"
WHERE rs.rank_id = 4;


However, it still says "Registered" below each user's name instead of the custom rank my query should have assigned them. How do I update the cache of XenForo to show the updated ranks?
 
Top Bottom