public increaseInviteCount ( integer $UserID, integer $IncreaseBy = 1 ) | ||
$UserID | integer | The unique id of the user being affected. |
$IncreaseBy | integer | The number to increase CountInvitations by. |
public function increaseInviteCount($UserID, $IncreaseBy = 1)
{
$CurrentCount = $this->getInvitationCount($UserID);
// Do not alter if the user has unlimited invitations
if ($CurrentCount == -1) {
return true;
}
$this->SQL->update($this->Name)->set('CountInvitations', 'CountInvitations + ' . $IncreaseBy, false)->where('UserID', $UserID)->put();
}