From: Marcel Werk Date: Mon, 13 Jul 2015 16:50:28 +0000 (+0200) Subject: Fixed automatic revocation of paid subscriptions X-Git-Tag: 2.1.6~11 X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=49cd94f55c3570dff93f758bdacb2396c04a4310;p=GitHub%2FWoltLab%2FWCF.git Fixed automatic revocation of paid subscriptions --- diff --git a/wcfsetup/install/files/lib/system/cronjob/HourlyCleanUpCronjob.class.php b/wcfsetup/install/files/lib/system/cronjob/HourlyCleanUpCronjob.class.php index c502088b4e..d510170199 100644 --- a/wcfsetup/install/files/lib/system/cronjob/HourlyCleanUpCronjob.class.php +++ b/wcfsetup/install/files/lib/system/cronjob/HourlyCleanUpCronjob.class.php @@ -23,13 +23,14 @@ class HourlyCleanUpCronjob extends AbstractCronjob { // disable expired paid subscriptions if (MODULE_PAID_SUBSCRIPTION) { - $subscriptionUser = new PaidSubscriptionUserList(); - $subscriptionUser->getConditionBuilder()->add('isActive = ?', array(1)); - $subscriptionUser->getConditionBuilder()->add('endDate > 0 AND endDate < ?', array(TIME_NOW)); - $subscriptionUser->readObjects(); + $subscriptionUserList = new PaidSubscriptionUserList(); + $subscriptionUserList->getConditionBuilder()->add('isActive = ?', array(1)); + $subscriptionUserList->getConditionBuilder()->add('endDate > 0 AND endDate < ?', array(TIME_NOW)); + $subscriptionUserList->readObjects(); - if (count($subscriptionUser->getObjects())) { - $action = new PaidSubscriptionUserAction(array($subscriptionUser->getObjects()), 'revoke'); + if (count($subscriptionUserList->getObjects())) { + $action = new PaidSubscriptionUserAction($subscriptionUserList->getObjects(), 'revoke'); + $action->executeAction(); } } }