A newsletter Opt-in is configured as single however a confirmation is still sent to user.

Comments

meishme’s picture

Same here. Confirmation emails should not be sent to the user if the newsletter they're subscribing to is configured as "Single" (as opposed to "Double").

aheredia’s picture

Status: Active » Needs review
StatusFileSize
new2.16 KB

The problem is that Opt-in/out method varible isn't stored in a varible called 'simplenews_opt_inout_' . You should use the function 'simplenews_require_double_opt_in' to retrive this value.
I think this patch should solve the problem.

zanix’s picture

The patch above doesn't account for $value['newsletter_selection'] not being set or having a value.
This case happens when there is not a choice to pick the newsletter they sign up for.

This patch fixes this issue, #1364832: single opt_inout newsletter sends confirmations emails , #871558: compatibility with simplenews 2.x (for the 7.x version), and #1366926: emails are not saved in simplenews database as well.