• Модуль: im
  • Путь к файлу: ~/bitrix/modules/im/lib/V2/Settings/UserConfiguration.php
  • Класс: BitrixImV2SettingsUserConfiguration
  • Вызов: UserConfiguration::recoveryBinding
private function recoveryBinding(string $toEntity)
{
	$userPreset = Preset::getPersonal($this->userId);

	$bindingPreset =
		$userPreset->isExist()
			? $userPreset
			: Preset::getDefaultPreset()
	;
	$bindingPreset->bindToUser($this->userId, [$toEntity]);

	if ($toEntity === Preset::BIND_GENERAL)
	{
		$this->generalPreset = $bindingPreset;
	}
	else
	{
		$this->notifyPreset = $bindingPreset;
	}

	CacheManager::getUserCache($this->userId)->clearCache();
}