User expirePoints

From Catglobe Wiki
Jump to: navigation, search

User_expirePoints

Expire all points of given users before the given time

Syntax

User_expirePoints(array userResourceId, DateTime expireAllBefore, string Description[, Boolean Test]);

Arguments

  • userResourceId: array of userResourceId
  • expireAllBefore: DateTime class, points will be expired before that time
  • Description: string
  • Test: Boolean, optional default not set is true. If false all points before input time will be expired; if True will return amount expired but doesnt actually expire

Return type

Dictionary (Dictionary of userResourceId, Amount expired)

Example

//Expire all points before 2019 of 2 given users
//To see how many points will be expired, don't give Test parameter, or set Test = True
DateTime a = new DateTime("2019/1/1");
User_expirePoints({13848,15498936}, a , "Expire all point before 2019", true);
//{"13848": 50, "15498936": 0}

//To make actually expire, set Test to false
DateTime a = new DateTime("2019/1/1");
User_expirePoints({13848,15498936}, a , "Expire all point before 2019", false);
//{"13848": 50, "15498936": 0}

2019-11-22 17-17-34.png