• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/Configuration/EventHandler.php
  • Класс: BitrixImConfigurationEventHandler
  • Вызов: EventHandler::updateUserGroups
static function updateUserGroups($groupId, $userId): void
{
	$notifyJoin = Join::on('this.NOTIFY_GROUP_ID', 'ref.GROUP_ID');
	if (!self::isSelectedPersonalGroup($userId, $notifyJoin))
	{
		OptionUserTable::update($userId, ['NOTIFY_GROUP_ID' => $groupId]);
	}

	$generalJoin = Join::on('this.GENERAL_GROUP_ID', 'ref.GROUP_ID');
	if (!self::isSelectedPersonalGroup($userId, $generalJoin))
	{
		OptionUserTable::update($userId, ['GENERAL_GROUP_ID' => $groupId]);
	}
}