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

Group Promotions

#1
Hey everyone.

I just wanted to ask a quick question. I am making a sourcemod plugin that will be giving donator status to users on my forums that donate or "upgrade" their account with the feature built into the forum software. What I'd like to know is where at in the database will that make that user stand out to the other users that haven't donated. I was thinking one of the "xf_user_groups". Maybe someone can pinpoint me it the right direction. Thanks.
 

Brogan

XenForo moderator
Staff member
#2
If I understand you correctly, the tables related to user upgrades are:

xf_user_upgrade
xf_user_upgrade_active
xf_user_upgrade_expired
xf_user_upgrade_log
 

Jeremy

Well-known member
#5
You may want to look at XenForo_Model_User::addUserGroupChange($userId, $upgradeName, $secondaryGroup). It'll automatically upgrade the user and add them into a secondary group. You can then use several helpers in templates and PHP files to check to see if they are in a secondary user group.