- Модуль: calendar
- Путь к файлу: ~/bitrix/modules/calendar/lib/usersettings.php
- Класс: BitrixCalendarUserSettings
- Вызов: UserSettings::getFollowedSectionIdList
static function getFollowedSectionIdList($userId = false)
{
$sectionIdList = [];
if ($userId)
{
$defaultFollowedSectionId = intval(CUserOptions::GetOption("calendar", "superpose_displayed_default", 0, $userId));
if ($defaultFollowedSectionId)
{
$sectionIdList[] = $defaultFollowedSectionId;
}
$str = CUserOptions::GetOption("calendar", "superpose_displayed", false, $userId);
if (CheckSerializedData($str))
{
$idList = unserialize($str, ['allowed_classes' => false]);
if (is_array($idList))
{
foreach($idList as $id)
{
if (intval($id) > 0)
{
$sectionIdList[] = intval($id);
}
}
}
}
if ($defaultFollowedSectionId)
{
CUserOptions::SetOption("calendar", "superpose_displayed", serialize($sectionIdList));
CUserOptions::SetOption("calendar", "superpose_displayed_default", false);
}
}
return $sectionIdList;
}