• Модуль: landing
  • Путь к файлу: ~/bitrix/modules/landing/lib/controller/user.php
  • Класс: BitrixLandingControllerUser
  • Вызов: User::getUserNameByIdAction
static function getUserNameByIdAction(int $userId): string
{
	$res = UserTable::getList([
		'select' => [
			'NAME',
			'LAST_NAME'
		],
		'filter' => [
			'ID' => $userId
		]
	]);
	$row = $res->fetch();
	$result = new PublicActionResult();
	$result->setResult([
		'NAME' => CUser::formatName(
			CSite::getNameFormat(false),
			$row, true, false
		)
	]);
	return $result->getResult()['NAME'];
}