site_id = SITE_ID,
 sendPull = true,
 increment = 1

The method allows to increment user counter for the required value. Static method.


Parameter Description Available from version
user_id User ID
code Counter code
site_id Site ID. Optional. Current site is specified by default.
sendPull Optional. Specifies to immediately send data into the Push&Pull module for "real time counters" (sending is available when module is installed and "Queue server" is activated. Without queue server, the method works from the Push&Pull module version 12.5.4) If this counter must not be thrown, specify false. True by default.12.5.8
increment Increment value for the counter.14.0.0

Returned value

Returns true on success and false otherwise.


CUserCounter::Increment($USER->GetID(), 'code1');

© «Bitrix24», 2001-2022