XF 2.2 Adding a user upgrade with code

Edman

Member
I have Xenforo integrated with my site, and I need to add user upgrades from my site's admin CP.

I know how to find a user, and I know how to find an upgrade

Code:
$user = \XF::em()->find('XF:User', $userid);
$upgrade = \XF::em()->find('XF:UserUpgrade', 2);

But how do you add the upgrade to the user?

EDIT: nevermind, after more searching found this thread
solves everything!
 
Last edited:
Top