Documentation

getUsers

array|boolean public
\Bitrix\Blog\BlogUser::getUsers(
 array $ids = array()
);

Gets full information on users by their IDs. Non-static method.

When passing time $cacheTime when creating an instance of BlogUser class, caches and passes different user selections upon repeated request. Otherwise, each time executes a database query.

Parameters

ParameterDescriptionVersion
$idsArray of user IDs

Examples

Gets data for all users who posted comments to this message.

$arPost = CBlogPost::GetByID($this->arParams["ID"]);
$cacheTime = 86400; //one day
$blogUser = new \Bitrix\Blog\BlogUser($cacheTime);
$commentUsers = $blogUser->getUsers(\Bitrix\Blog\BlogUser::getCommentAuthorsIdsByPostId($arPost['ID']));


© «Bitrix24», 2001-2024
Up