A
A
anriko2020-01-20 17:00:01
1C-Bitrix
anriko, 2020-01-20 17:00:01

How to make a check in Bitrix if a letter to the administrator add an attachment if the user does not?

It didn't work out
the main fitback component

$arFields = Array(
                "AUTHOR" => $_POST["user_name"],
                "AUTHOR_EMAIL" => $_POST["user_email"],
                "PHONE" => $_POST["user_phone"],
                "EMAIL_TO" => $arParams["EMAIL_TO"],
                "TEXT" => $_POST["MESSAGE"],
                "FILE_NAME" => $_FILES['file']['name']
            );

if($_POST["user_email"] !== $arParams["EMAIL_TO"]){
CEvent::Send($arParams["EVENT_NAME"], SITE_ID, $arFields,"","",$file_array);}
else{
CEvent::Send($arParams["EVENT_NAME"], SITE_ID, $arFields,"","");
}

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexey, 2020-01-20
@AlexeyCaTHaR

Didn't work what? compare two email addresses or add attachments?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question