<?
$arrFriends = array();
$currentUserId = intval($v["ID"]);
$dbFriends = CSocNetUserRelations::GetRelatedUsers($currentUserId, SONET_RELATIONS_FRIEND);
while ($arFriends = $dbFriends->GetNext())
{
$pref = (($currentUserId == $arFriends["FIRST_USER_ID"]) ? "SECOND" : "FIRST");
echo $arrFriends[$arFriends[$pref."_USER_ID"]] = $arFriends[$pref."_USER_NAME"]." ".$arFriends[$pref."_USER_LAST_NAME"];
}
?>
|