Fixes bug where reminder e-mails were sent to users that had deactivated their subscription.

master
Sven Slootweg 10 years ago
parent f5b86d9005
commit bf6f798df7

@ -34,7 +34,7 @@ Currency::UpdateRates();
try 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) catch (NotFoundException $e)
{ {

Loading…
Cancel
Save