Add updateEmailData hook

This commit is contained in:
Will Rossiter 2014-02-03 12:10:44 +13:00
parent 03adf3e258
commit f90b997c29

View File

@ -976,12 +976,14 @@ JS
"Sender" => Member::currentUser(), "Sender" => Member::currentUser(),
"Fields" => $submittedFields "Fields" => $submittedFields
); );
$this->extend('updateEmailData', $emailData, $attachments);
// email users on submit. // email users on submit.
if($recipients = $this->FilteredEmailRecipients($data, $form)) { if($recipients = $this->FilteredEmailRecipients($data, $form)) {
$email = new UserDefinedForm_SubmittedFormEmail($submittedFields); $email = new UserDefinedForm_SubmittedFormEmail($submittedFields);
if($attachments){ if($attachments) {
foreach($attachments as $file) { foreach($attachments as $file) {
if($file->ID != 0) { if($file->ID != 0) {
$email->attachFile( $email->attachFile(