mirror of
https://github.com/silverstripe/silverstripe-userforms.git
synced 2024-10-22 17:05:42 +02:00
Only add attachments when HideFormData-setting is not set for this recipient
This commit is contained in:
parent
a617be30fe
commit
fad372d4ba
@ -323,7 +323,7 @@ JS
|
|||||||
// Merge fields are used for CMS authors to reference specific form fields in email content
|
// Merge fields are used for CMS authors to reference specific form fields in email content
|
||||||
$mergeFields = $this->getMergeFieldsMap($emailData['Fields']);
|
$mergeFields = $this->getMergeFieldsMap($emailData['Fields']);
|
||||||
|
|
||||||
if ($attachments) {
|
if ($attachments && (bool) $recipient->HideFormData === false) {
|
||||||
foreach ($attachments as $file) {
|
foreach ($attachments as $file) {
|
||||||
/** @var File $file */
|
/** @var File $file */
|
||||||
if ((int) $file->ID === 0) {
|
if ((int) $file->ID === 0) {
|
||||||
|
Loading…
Reference in New Issue
Block a user