Documentation

CForumUserPoints::Add

bool
CForumUserPoints::Add(
 array arFields
);

The method Add adds a new record to the table of forum visitors votes.

Parameters

ParameterDescription
arFields Associated array of values of record parameters.

Return Values

The method returns the ID of the added record on success, or false otherwise.

Example



<?
// The current user gives his 10 votes to the user $UID

$arFields = array(
   "POINTS" => 10,
   "FROM_USER_ID" => $USER->GetID(),
   "TO_USER_ID" => $UID
);

if (CForumUserPoints::Add($arFields))
   echo "Votes have been successfully given";
else
   echo "Error in voting";
?>
© «Bitrix24», 2001-2024
Up