On the settings page of userpoints module it is clearly stated that points expire only for users who haven't earned (been inactive) any points for defined period of time. Unfortunately on my site even active users lose points because of userpoints expire module.

Comments

Leeteq’s picture

Subscribing.

artscoop’s picture

Hi,
it seems that is has never been fixed.

You may try this :
In userpoints.module, go to function userpoints_expire_transactions(), and surround the content of the function with :

  $sqlC = "SELECT uid, time_stamp FROM {userpoints_txn} WHERE time_stamp > %d ORDER BY time_stamp DESC LIMIT 0,1";
  $resultsC = db_query($sqlC, time()-604800);
  if (!db_fetch_array($resultsC)) {

and

}

If I'm correct, this checks that no transaction was done in the last week (>now-604800) before killing earned userpoints.

berdir’s picture

Status: Active » Closed (won't fix)

Sorry for pinging the participants.

Now that Drupal 7 is out, there is no support for Drupal 5 and the
corresponding modules anymore. Therefore, I'm closing all old issues
which are still open.

I suggest you upgrade to Drupal 6 or 7 and figure out if you're feature
is still needed or the bug still exists and open a new issue in that
case.

iseethesun79’s picture

Hi,

Can i check how the user points expiry works?
Let's say a user gets 100 points today that expires in a year and then
200 points after 6 months that expires in a year from the day points awarded.

He then spends 150 points. Will he spend points that expire earlier (i.e. first 100 + second 50) or all 150 from the most recent 200.

How does the code achieve this?

-
Roger