Points are never expired if cron is called more than once a day
NITEMAN - March 25, 2009 - 19:41
| Project: | User Points Contributed modules |
| Version: | 5.x-3.0 |
| Component: | Code: userpoints_expire |
| Category: | bug report |
| Priority: | critical |
| Assigned: | Unassigned |
| Status: | closed |
Jump to:
Description
First of all excuse me for my bad english and for the fact that I can only point the bug but my knoweldge isn't enought to provide a fix for it.
When the function userpoints_expire_cron() is called the first line causes it to do nothing if cron_last is more recent than a day
<?php
if (time() - variable_get('cron_last', 0) > 86400) {
?>I guess probably another variable is needed to store last time points where expired.
Thanks in advance for any help with this.

#1
I changed it to:
<?phpif (time() - variable_get('userpoints_expire_lastcron', 0) > 86400) {
variable_set('userpoints_expire_lastcron', time());
...
?>
Now at least it works.
#2
Fixed in -dev and will be in the tarball tonight.
#3
Automatically closed -- issue fixed for 2 weeks with no activity.