Skip to content
This repository has been archived by the owner on Nov 3, 2023. It is now read-only.

Don't remove old subscriptions that have not been activated yet #8824

Closed
tsarma opened this issue Dec 7, 2017 · 4 comments
Closed

Don't remove old subscriptions that have not been activated yet #8824

tsarma opened this issue Dec 7, 2017 · 4 comments
Assignees
Labels
Milestone

Comments

@tsarma
Copy link

tsarma commented Dec 7, 2017

// Remove old subscriptions that have not been activated yet
if (($objOld = \NewsletterRecipientsModel::findBy(array("email=? AND active=''"), $varInput)) !== null)
{
while ($objOld->next())
{
$objOld->delete();
}
}

Please don't not delete old subscriptions automatically. I have multiple newsletter channels corresponding to each online competitions. A person can take part in a competition only after subscribing to the corresponding NL.

To each competition, I have prepared a NL registration with pre selected channel but hidden. This registration form is then placed inside an article describing the competition.

If a person subscribe to a NL and before activation, he then subscribes to the next NL. He is deleted from the first NL channel.

@leofeyer leofeyer added this to the 3.5.32 milestone Dec 13, 2017
@leofeyer
Copy link
Member

Would it help if we limited deletions to the current channel(s)?

@leofeyer
Copy link
Member

@contao/developers /cc

@tsarma
Copy link
Author

tsarma commented Jan 15, 2018

Would it help if we limited deletions to the current channel(s)?

Yes, this would work and I find it basically correct to restrict to the current channels.
Thank you for looking into this once again, in the mean time we are integrating this workflow in external newsletter tool (which is not yet setup). In this way, I can prepare a normal Contao form which submits to external newsletter tool.

@leofeyer
Copy link
Member

Fixed in 8b7425b.

leofeyer added a commit to contao/newsletter-bundle that referenced this issue Jan 17, 2018
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants