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.

Support from Acquia helps fund testing for Drupal Acquia logo

Comments

selva8187’s picture

Please give some ideas

I am also facing same issue

selva8187’s picture

Priority: Normal » Major
selva8187’s picture

Priority: Major » Critical
Neo13’s picture

Hello,

You can do this by "hacking" the simplenews_confirm_subscription() function a bit. Just find the line with code

elseif ($op == 'add') {

and below replace the return drupal_get_form('simplenews_confirm_add_form', $subscriber->mail, $category); to this simplenews_subscribe_user($subscriber->mail, $category->tid, FALSE, 'website'); (you can adjust the parameters as you need).

Hope it helps.

miro_dietiker’s picture

Priority: Critical » Normal

Please follow the priority level definitions.
https://www.drupal.org/core/issue-priority

Support requests should never be marked "critical" or "major". ... A higher issue priority is unlikely to give you better support;

selva8187’s picture

Sorry miro_dietiker,

I know but i need immediate assistance that's why i marked "critical" . I will correct this in future.

Thankyou

miro_dietiker’s picture

@selva8187 If you need immediate assistance, this is the wrong channel to escalate. Lots of professionals, including the maintainers are offering paid services.

smokris’s picture

Version: 7.x-2.x-dev » 7.x-1.x-dev
Category: Support request » Feature request
Status: Active » Needs review
FileSize
3.28 KB

Here'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.)

anni’s picture

Yeah, thank you. The patch in #8 worked for me (Simplenews 7.x-1.1).

broon’s picture

I 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.

miro_dietiker’s picture

Category: Feature request » Support request
Status: Needs review » Fixed

Yes 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?

Status: Fixed » Closed (fixed)

Automatically closed - issue fixed for 2 weeks with no activity.