Answer the question
In order to leave comments, you need to log in
How can I enable notifications for all users at once?
How to enable event calendar notifications by email in Bitrix 24 for all users? This feature is located in the user's personal settings, but you need to activate it for all portal users at once.
Answer the question
In order to leave comments, you need to log in
For the boxed version, it may work:
\Bitrix\Main\Loader::IncludeModule('im');
/**
* @var integer Чьи настройки берем (id)
*/
$fromUserId = 1;
/**
* @var integer Кому их сохраняем (id)
*/
$toUserId = 2;
$userSettings = CIMSettings::Get($fromUserId);
foreach ($userSettings as $type => $value)
{
CIMSettings::Set($type, $value, $toUserId);
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question