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

Upgrade user API (need help on vars for : function upgradeUser)

A

account8226

Guest
#1
Hello,

I would like to create my add-on which would upgrade a user when he do something.

But I don't get how to use this :

public function upgradeUser($userId, array $upgrade, $allowInsertUnpurchasable = false, $endDate = null)
What do I have to add into these var :
  • array $upgrade
  • $allowInsertUnpurchasable
  • $endDate (I want upgrade to last forever)
How do I tell the API in what usergroup I want the user to be added ?
I don't get the use of this upgrade array.

Best regards.
 
A

account8226

Guest
#3