- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/util.php
- Класс: BitrixCalendarUtil
- Вызов: Util::getAttendees
static function getAttendees(array $codeAttendees = null, string $stringWrapper = ''): array
{
if (empty($codeAttendees))
{
return [];
}
$userIdList = [];
$userList = [];
foreach ($codeAttendees as $codeAttend)
{
if (mb_strpos($codeAttend, 'U') === 0)
{
$userId = (int)(mb_substr($codeAttend, 1));
$userIdList[] = $userId;
}
}
if (!empty($userIdList))
{
$res = BitrixMainUserTable::getList(array(
'filter' => [
'=ID' => $userIdList,
],
'select' => ['NAME', 'LAST_NAME'],
));
while ($user = $res->fetch())
{
$userList[] = addcslashes($stringWrapper . $user['NAME'].' '.$user['LAST_NAME'] . $stringWrapper, "()");
}
}
return $userList;
}