From bf6f798df7691c3c8aae6e877bdaba14add174b6 Mon Sep 17 00:00:00 2001 From: Sven Slootweg Date: Wed, 25 Jun 2014 13:05:12 +0200 Subject: [PATCH] Fixes bug where reminder e-mails were sent to users that had deactivated their subscription. --- public_html/cron.daily.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/public_html/cron.daily.php b/public_html/cron.daily.php index 586a608..3cfc69c 100644 --- a/public_html/cron.daily.php +++ b/public_html/cron.daily.php @@ -34,7 +34,7 @@ Currency::UpdateRates(); try { - $sSubscriptions = Subscription::CreateFromQuery("SELECT * FROM subscriptions WHERE `Confirmed` = 1 AND `Active` = 1 AND `LastEmail` IS NULL OR `LastEmail` < DATE_SUB(NOW(), INTERVAL 1 MONTH)"); + $sSubscriptions = Subscription::CreateFromQuery("SELECT * FROM subscriptions WHERE `Confirmed` = 1 AND `Active` = 1 AND (`LastEmail` IS NULL OR `LastEmail` < DATE_SUB(NOW(), INTERVAL 1 MONTH))"); } catch (NotFoundException $e) {