First of all, thanks for the great module! I started using it recently and now need some change in functionality.
Problem/Motivation
By default authenticated users (un)subscribed immediately. But sometimes they need to be (un)subscribed with confirmation email. I haven't found similar requests/issues, so decided to create a new one.
Proposed resolution
I propose adding new option to field "Opt-in/out method" (/admin/config/services/simplenews/manage/{simplenews_newsletter}), called "Double (Forced)", which will be used for having confirmation email for all users.
Remaining tasks
As starting point I'm adding patch in the comment below, so it needs to be reviewed. I tested it locally and it works as I suppose it to be. I haven't updated tests yet (I mean updating existing or creating new cases for this), because not sure about best way for it (need more time from me to carefully study existing cases and implement new ones).
User interface changes
Field "Opt-in/out method" options and description on /admin/config/services/simplenews/manage/{simplenews_newsletter}.
Comment | File | Size | Author |
---|---|---|---|
#5 | interdiff-2830376-2-5.txt | 21.42 KB | ilya.no |
#5 | simplenews-forced-double-optin-2830376-5.patch | 23.74 KB | ilya.no |
#2 | simplenews-forced-double-optin-2830376-2.patch | 3.86 KB | ilya.no |
Comments
Comment #2
ilya.no CreditAttribution: ilya.no as a volunteer and at Skilld commentedInitial patch attached for 8.x-1.0-alpha2 version.
Comment #3
jonathanshawFeatures always need tests.
Comment #5
ilya.no CreditAttribution: ilya.no as a volunteer and at Skilld commentedAttaching path with tests.
Comment #6
jonathanshawSetting to NR to run tests
Comment #8
AdamPS CreditAttribution: AdamPS at AlbanyWeb commentedThe issue doesn't say why this would be useful. The main purpose of double-confirmation is to prove that the subscriber owns that email address. However Drupal core already has a setting "Require email verification when a visitor creates an account".