• Модуль: intranet
  • Путь к файлу: ~/bitrix/modules/intranet/classes/general/event_calendar.php
  • Класс: CEventCalendar
  • Вызов: CEventCalendar::GetCurCalsSPParams
function GetCurCalsSPParams()
{
	$uid = false;
	$name = '';
	if ($this->ownerType == 'USER')
	{
		$gr_title = GetMessage('EC_SUPERPOSE_GR_USER');
		$group = 'SOCNET_USERS';
		$uid = $this->ownerId;

		if ($uid == $this->userId)
		{
			$name = GetMessage('EC_SUPERPOSE_GR_CUR_USER');
		}
		else
		{
			$r = CUser::GetByID($uid);
			if (!$arUser = $r->Fetch())
				return;
			$name = trim($arUser['NAME'].' '.$arUser['LAST_NAME']);
			if ($name == '')
				$name = trim($arUser['LOGIN']);
			$name .= ' <'.$arUser['EMAIL'].'> ['.$uid.']';
		}
	}
	elseif($this->ownerType == 'GROUP')
	{
		$gr_title = GetMessage('EC_SUPERPOSE_GR_GROUP');
		$group = 'SOCNET_GROUPS';
		if (isset($this->_sp_par_name))
			$name = $this->_sp_par_name;
	}
	else
	{
		$gr_title = GetMessage('EC_SUPERPOSE_GR_COMMON');
		$group = 'COMMON';
		if (isset($this->_sp_par_name))
			$name = $this->_sp_par_name;
	}

	return array
	(
		'GROUP' => $group,
		'GROUP_TITLE' => $gr_title,
		'NAME' => $name,
		'USER_ID' => $uid
	);
}