- Модуль: voximplant
- Путь к файлу: ~/bitrix/modules/voximplant/classes/general/vi_user.php
- Класс: CVoxImplantUser
- Вызов: CVoxImplantUser::SetCallByPhone
public function SetCallByPhone($userId, $active = true)
{
$userId = intval($userId);
if(!$userId)
return false;
if ($active)
{
$arUserInfo = $this->GetUserInfo($userId);
if (!$arUserInfo['phone_enable'])
{
$this->error = new CVoxImplantError(__METHOD__, 'PHONE_NOT_CONNECTED', 'Phone is not connected');
return false;
}
}
CUserOptions::SetOption('voximplant', 'call_by_phone', ($active? true: false), false, $userId);
return true;
}