'exception_handling' => array (
'value' => array (
'debug' => false,
'handled_errors_types' => E_ALL & ~E_NOTICE & ~E_STRICT & ~E_USER_NOTICE,
'exception_errors_types' => E_ALL & ~E_NOTICE & ~E_WARNING & ~E_STRICT & ~E_USER_WARNING & ~E_USER_NOTICE & ~E_COMPILE_WARNING & ~E_DEPRECATED,
'ignore_silence' => false,
'assertion_throws_exception' => true,
'assertion_error_type' => 256,
'log' => array (
'settings' => array (
'file' => 'bitrix/modules/error.log',
'log_size' => 1000000,
),
),
),
'readonly' => false,
),
AddEventHandler("iblock", "OnAfterIBlockElementAdd", Array("wsAfterForm", "wsOnAfterResultAdd"));
class wsAfterForm {
public static function wsOnAfterResultAdd(&$arFields) {
if ($arFields["IBLOCK_ID"] == 15) {
global $USER;
$USER_ID = $USER->GetID();
$user = new CUser;
$fields = Array(
"UF_CLIENT" => "1",
);
$user -> Update($USER_ID, $fields);
}
}
}
AddEventHandler("iblock", "OnAfterIBlockElementAdd", Array("wsAfterForm", "wsOnAfterResultAdd"));
class wsAfterForm {
function wsOnAfterResultAdd(&$arFields) {
if ($arFields["IBLOCK_ID"] == 15) {
\Bitrix\Main\Diag\Debug::writeToFile($arFields["IBLOCK_ID"] , 'form id', 'log_test_form.txt');
}
}
}
AddEventHandler("form", "onAfterResultAdd", array("wsAfterForm", "wsOnAfterResultAdd"));
class wsAfterForm {
public static function wsOnAfterResultAdd($WEB_FORM_ID, $RESULT_ID) {
\Bitrix\Main\Diag\Debug::writeToFile($WEB_FORM_ID , 'form id', 'log_test_form.txt');
if ($WEB_FORM_ID == 15) {
mail("почта", "Тест формы", "Тест формы");
}
}
}
Как сделать что бы Bitrix искал по привязанным элементам?