Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
I would like to know if i could use double Opt-in/out method and when user click the link from email , automatic subscribe to the newsletter list . So doesn't have to go to subscribe page and then click the subscribe button.
Comment | File | Size | Author |
---|---|---|---|
#8 | simplenews-simpler-double-opt-in-2351465-8.patch | 3.28 KB | smokris |
Comments
Comment #1
selva8187 CreditAttribution: selva8187 commentedPlease give some ideas
I am also facing same issue
Comment #2
selva8187 CreditAttribution: selva8187 commentedComment #3
selva8187 CreditAttribution: selva8187 commentedComment #4
Neo13 CreditAttribution: Neo13 commentedHello,
You can do this by "hacking" the simplenews_confirm_subscription() function a bit. Just find the line with code
and below replace the
return drupal_get_form('simplenews_confirm_add_form', $subscriber->mail, $category);
to thissimplenews_subscribe_user($subscriber->mail, $category->tid, FALSE, 'website');
(you can adjust the parameters as you need).Hope it helps.
Comment #5
miro_dietikerPlease follow the priority level definitions.
https://www.drupal.org/core/issue-priority
Comment #6
selva8187 CreditAttribution: selva8187 commentedSorry miro_dietiker,
I know but i need immediate assistance that's why i marked "critical" . I will correct this in future.
Thankyou
Comment #7
miro_dietiker@selva8187 If you need immediate assistance, this is the wrong channel to escalate. Lots of professionals, including the maintainers are offering paid services.
Comment #8
smokrisHere's a patch that streamlines the double-opt-in process by eliminating the final click. (Based on comment #4, but this patch also respects the
simplenews_confirm_subscribe_page
setting and removes the no-longer-needed form.)Comment #9
anni CreditAttribution: anni commentedYeah, thank you. The patch in #8 worked for me (Simplenews 7.x-1.1).
Comment #10
broonI am not sure if it is intended to work that way, but if you alter the confirmation link in the email that is sent to the user by adding "/ok" to the end of it, the user is subscribed immediately when clicking the link. There is no form appearing with another subscribe button. Also works in Drupal 8.
Comment #11
miro_dietikerYes that's by design. We added the /ok multiple times if the requirement was to make the link directly actionable, without a confirmation.
I guess that answer then fixes the question?