Documentation

Set

CUserCounter::Set(
 user_id,
 code,
 value,
 site_id = SITE_ID
 tag = ""
);

The method allows to specify any number for the counter. Static method.

Parameters

Parameter Description Available from version
user_id User ID11.5.2
code Counter code11.5.2
value Specified value11.5.2
site_id Site ID, optional parameter. Current site is specified by default.11.5.2
tag Optional. Used to delete groups of similar counters.11.5.6
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

Returned value

Returns true on success, false otherwise

Examples

CUserCounter::Set($USER->GetID(), 'code2', 100500); 


© «Bitrix24», 2001-2024
Up