global $USER;
if (!is_object($USER))
{
$USER = new \CUser();
}
$errors = [];
\CBPDocument::StartWorkflow(
self ::BIZPROC_ID,
[ "crm" , "CCrmDocumentDeal" , "DEAL_1"],
[ 'TargetUser' => "user_{$USER->GetID()}" ],
$errors
);
// init.php
$_SERVER["REMOTE_ADDR"] = $_SERVER['HTTP_CF_CONNECTING_IP'];
Отправитель всегда один:
.msmtprc
set_from_header on
Отправлять через внешний SMTP:
/bitrix/.settings.php
'smtp' =>
array (
'value' =>
array(
'enabled' => true,
'debug' => true, //optional
'log_file' => '/var/mailer.log', //optional
),
),
cd ~/www
find . -type d -exec chmod 775 {} \;
find . -type f -exec chmod 664 {} \;
find . -type d -exec chown bitrix:bitrix {} \;
find . -type f -exec chown bitrix:bitrix {} \;
chown -R www-data:www-data /path/to/your/bitrix/
chown -R bitrix:bitrix /home/bitrix/www
В таблице b_user_option удалить пункт меню с удаленным СП
// /www/bitrix/modules/intranet/lib/UI/LeftMenu/Menu.php
/bitrix/modules/crm/classes/general/crm_deal.php
добавляем & перед $arRows в методе SaveProductRows