Documentation

GetMessagesUsers

CDBResult
CSocNetMessages::GetMessagesUsers(
 int userID,
 array arNavStartParams = false,
 int online_interval = 120
);

The method returns list of users with ongoing correspondence with current user. Non-static method.

Parameters

Parameter Description Available from version
userID user ID.
arNavStartParams Pagewise navigation parameters.
online_interval Server polling time parameter, in seconds. Optional parameter. Default value is 120.

Returned value

CDBResult object, containing list of users. Each message has the following fields:
ID - user ID,
LOGIN - user login,
NAME - user name,
LAST_NAME - user last name,
PERSONAL_PHOTO - user photo ID,
TOTAL - total messages in correspondence,
MAX_DATE - date of the last message,
UNREAD - number of unread messages.

See Also

  • [link=89808]CDBResult[/link]

Examples

<?
// Select users that have correspondence with current user for pagewise navigation of 20 records
$arNavParams = array("nPageSize" => 20, "bDescPageNumbering" => false);
$dbMessages = CSocNetMessages::GetMessagesUsers($GLOBALS["USER"]->GetID(), $arNavParams);
while ($arMessages = $dbMessages->GetNext())
{
     . . .
}
?>


© «Bitrix24», 2001-2024