Documentation

CForumUserPoints::Update

bool
CForumUserPoints::Update(
 int FROM_USER_ID, 
 int TO_USER_ID, 
 array arFields
);

The method Update modifies the existing parameters of a vote that a user FROM_USER_ID has given to a user TO_USER_ID.

Parameters

ParameterDescription
FROM_USER_ID The user who has given a vote.
TO_USER_ID The user to whom a vote has been given.
arFields Array of new parameters of a vote.

Return Values

Returns true on success, or false otherwise.

Example



<?
// Change the number of votes (that the current user has given to 
// the user $UID) to 53
$arFields = array("POINTS" => 53);
if (CForumUserPoints::Update($USER->GetID(), $UID, $arFields))
   echo "Voting is successfully changed";
else
   echo "Error updating votes";
?>
© «Bitrix24», 2001-2024