Group Promotions

Surf3rDud3

Member
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.
 
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
 
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.
 
Back
Top Bottom