- Модуль: im
- Путь к файлу: ~/bitrix/modules/im/lib/Configuration/EventHandler.php
- Класс: BitrixImConfigurationEventHandler
- Вызов: EventHandler::isSelectedPersonalGroup
static function isSelectedPersonalGroup(int $userId, ConditionTree $join): bool
{
$selectedGroup =
OptionUserTable::query()
->addSelect('USER_ID')
->registerRuntimeField(
'OPTION_ACCESS',
new Reference(
'OPTION_ACCESS',
OptionAccessTable::class,
$join,
['join_type' => Join::TYPE_INNER]
)
)
->where('USER_ID', $userId)
->where('OPTION_ACCESS.ACCESS_CODE', 'U' . $userId)
->fetch();
return $selectedGroup !== false;
}