Bitrix Site Manager

CForumUserPoints::GetByID

array
CForumUserPoints::GetByID(
 int FROM_USER_ID, 
 int TO_USER_ID
);

The method GetByID returns an array describing votes of the user FROM_USER_ID given to the user TO_USER_ID.

Parameters

ParameterDescription
FROM_USER_ID The ID of the user who has given his vote.
TO_USER_ID The ID of the user to whom a vote has been given.

Return Values

Returns an associated array containing the following keys:

Key Value
FROM_USER_ID The ID of the user who has given his vote.
TO_USER_ID The ID of the user to whom a vote has been given.
POINTS Number of votes given.
DATE_UPDATE The date the record was last modified.

Example



<?
// Display the number of votes the current user has given
// to the user $AID
$arUserPoints = CForumUserPoints::GetByID($USER->GetID(), $AID);
if ($arUserPoints)
{
   echo "You have given ".$arUserPoints["POINTS"]. " votes to this user";
}
?>