Documentation

getPostAuthorsIdsByDbFilter

array public static
\Bitrix\Blog\BlogUser::getPostAuthorsIdsByDbFilter(
  $arFilter
);

Utility method that allows conveniently handle users during filtering. Allows getting blog post author IDs using the same filter array as for получить CBlogPost::GetList(). Static method.

Parameters

ParameterDescriptionVersion
$arFilterFilter

Исключения

  • \Bitrix\Main\ArgumentNullException

Example

Get list of blog messages using complex user-defined selection and get array of authors for these messages.

// Get list of messages using specific selection conditions in $arFilter.
$dbPosts = CBlogPost::GetList(
	$sort,
	$arFilter,
	false,
	$count,
	$arFields
);
while ($arPost = $dbPosts->GetNext())
{
	...
}

// Find message author IDs for this selection 
$blogUser = new \Bitrix\Blog\BlogUser();
$blogUsers = $blogUser->getUsers(\Bitrix\Blog\BlogUser::getPostAuthorsIdsByDbFilter($arFilter));


© «Bitrix24», 2001-2024
Up