Only add attachments when HideFormData-setting is not set for this recipient

This commit is contained in:
Bauke Zwaan 2021-03-12 09:30:11 +01:00
parent a617be30fe
commit fad372d4ba

View File

@ -323,7 +323,7 @@ JS
// Merge fields are used for CMS authors to reference specific form fields in email content
$mergeFields = $this->getMergeFieldsMap($emailData['Fields']);
if ($attachments) {
if ($attachments && (bool) $recipient->HideFormData === false) {
foreach ($attachments as $file) {
/** @var File $file */
if ((int) $file->ID === 0) {