Upgrade / Secondary Groups


Well-known member
* Upgrades the user with the specified upgrade.
* @param integer $userId
* @param array $upgrade Info about upgrade to apply
* @param boolean $allowInsertUnpurchasable Allow insert of a new upgrade even if not purchasable
* @param integer|null $endDate Forces a specific end date; if null, don't overwrite
* @return integer|false User upgrade record ID
public function upgradeUser($userId, array $upgrade, $allowInsertUnpurchasable = false,
$endDate = null)

I use it with:

$a = time();
$b = intval($a + 5184000); // 60 days
$upgrade = $upgradeModel->upgradeUser($user['user_id'], $upgrade=array(user_upgrade_id=>2), true, $b);

But i am shure there should be more data inside the array $upgrade.
But i have no idea what. Maybe you know it, please?
Last edited: