Documentation

Clear

CUserCounter::Clear(
 user_id,
 code
 site_id = SITE_ID,
 sendPull = true
);

The method clears counter data. Non-static method.

Parameters

Parameter Description Available from version
user_id User ID11.5.2
code Counter code11.5.2
site_id Site ID. Optional. Current site is specified by default.11.5.2
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 and false otherwise.

Example

CUserCounter::Clear($USER->GetID(), "code3");  


© «Bitrix24», 2001-2024
Up