P
P
photosho2018-06-19 11:20:28
Bitrix24
photosho, 2018-06-19 11:20:28

How can I enable notifications for all users at once?

5b28bc80e0d30161508240.png
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

1 answer(s)
A
Andrey Nikolaev, 2018-06-29
@photosho

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 question

Ask a Question

731 491 924 answers to any question