CCrmViewHelper::getUserInfo

  1. Bitrix24 API (v. 23.675.0)
  2. crm
  3. CCrmViewHelper
  4. getUserInfo
  • Модуль: crm
  • Путь к файлу: ~/bitrix/modules/crm/classes/general/crm_view_helper.php
  • Класс: \CCrmViewHelper
  • Вызов: CCrmViewHelper::getUserInfo
static function getUserInfo(bool $isTitleProtect = false, bool $isImageUrlEncode = true): array
{
	$userInfo = Timeline\Layout\User::current()->toArray();
	$userInfo['userId'] = Container::getInstance()->getContext()->getUserId();

	if ($isTitleProtect)
	{
		$userInfo['title'] = htmlspecialcharsbx($userInfo['title']);
	}

	if ($isImageUrlEncode)
	{
		$userInfo['imageUrl'] = \Bitrix\Main\Web\Uri::urnEncode($userInfo['imageUrl']);
	}

	return $userInfo;
}

Добавить комментарий