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

How do you automate user groups?

#1
Hello i am trying to figure out how to automate user groups so a user can be set when a sub forum is created. I have been working on allowing users to create their own sub forum and the only problem left is i need to be able to set the creator to moderator of that forum and set them to a user group specified to the area so the sub forum can be a private node.

I am wondering if anyone knows of a plugin that could be useful or a way i can get this working. I tried searching for a plugin related to premium memberships, hoping there was a plugin that when a user purchases or donates they are automatically set to a new premium usergroup. If anyone knows of a plugin or a way to make that work i can probably use that to get my user groups automated.

Thanks, Craig
 

Jake Bunce

XenForo moderator
Staff member
#2
Just use the user datawriter:

XenForo_DataWriter_User

That allows you to update groups. It also automatically rebuilds all caches for that user.

This is a good code example:

XenForo_ControllerAdmin_User::actionSave