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.
The attached patch provides two new actions to simplenews_rules
- simplenews_rules_action_subscription_delete ( Delete a subscriber from a selected newsletter )
- simplenews_rules_action_subscriber_delete ( Delete a subscriber from all newsletters )
Thanks,
DT
Comments
Comment #1
BerdirLooks ok to me, one small coding style issue below. Wondering if we want to reference the unsubscribe action somehow in the description, stating that you should only use delete if you really want that information to be gone completely, or something like that.
The named parameter part should be on a separate line.
Same for the one below.
Comment #2
davidwhthomas CreditAttribution: davidwhthomas commentedThanks Berdir,
I noticed the named parameter on the same line for the other existing actions, so just kept that format, in case was for a reason.
I'll make some adjustments and post an update.
Comment #3
BerdirWasn't aware that the existing rules were wrong as well. You're welcome to fix that as well while you're at it.
Comment #4
davidwhthomas CreditAttribution: davidwhthomas commentedThanks Berdir, there's the updated patch.
Comment #5
BerdirThanks, commited and pushed!
Comment #7
davidwhthomas CreditAttribution: davidwhthomas commentedHi Berdir,
I found a bug with the earlier rules patch when deleting a subscription from a specific newsletter.
The rule was passing the subscriber 'mail' when it needed to pass the subscriber 'snid'
The attached patch fixes that issue.
Thanks.
Comment #8
dlnsk CreditAttribution: dlnsk commentedI made same changes for simplenews_rules_action_subscription_delete
Comment #9
areynolds CreditAttribution: areynolds commentedPatch in #7 works for me on 7.x-1.1; since both dev and 1.1 are probably at the same point right now, guessing this is good to be committed.
Comment #10
areynolds CreditAttribution: areynolds commentedActually @davidwhthomas, is there any reason for the changes in simplenews_mail_spool() that are included in the patch? May want to re-roll with only the changes in simplenews_rules_action_subscription_delete(). Sorry to nitpick, but guessing the maintainer may appreciate that if it is extraneous.