How can add to the options of when user points expire. I want the points to expire 4 months from the day that they are added. It won't delete all points right? Just the ones that are expired.

Thanks

Comments

jredding’s picture

The standard release of userpoints includes a point expiration option. If you set this option individual point entries will be reversed (deleted) when they date is reached. For example if set point expiration to 2 days the following would happens
Monday user gains 5 points ; total 5 points
Tuesday user gains 10 point; total 15 points
Wednesday user has 5 points automatically expire; total 10 points
Thursday user has 10 points automatically expire; total 0 points

Hope that makes sense

drfuzetto’s picture

Yes that makes sense but what about changing the expiration time frames? How do I do that?

jredding’s picture

In the administrative section of userpoints. The expiration is userpoints wide an not specific to userpoints_rules.

mitchell’s picture

Component: Code: userpoints_rules/userpoints_workflow_ng » Documentation
Status: Active » Fixed

seems like the user got the help he asked for.

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.

mitchell’s picture

Category: support » task
Status: Closed (fixed) » Needs work

moving to a 'needs work documentation task'

socialnicheguru’s picture

right now is there anyway to add different time frames for expiration of points. There is 1,2,3,4 weeks and 365 days. I would like to add other options.

socialnicheguru’s picture

Status: Needs work » Active

Anyway to add 5, 10, or 20 weeks if I want to?

in the userpoints.module I added:
3024000 => 'Five Weeks', // added line which is 5 weeks in seconds I believe.

I haven't tested it yet. I would love some help testing it.

/*
* returns an array of possible expiry times
* to the administrative settings page
*/
function expiry_dates() {
return array(
NULL => 'Never',
3600 => 'One hour',
86400 => 'One Day',
604800 => 'One Week',
1209600 => 'Two Weeks',
2419200 => 'Four Weeks',
3024000 => 'Five Weeks', // added line which is 5 weeks in seconds I believe.
31536000 => '365 Days',
);
} //expiry_dates

Bilmar’s picture

subscribing

manuel.adan’s picture

Issue summary: View changes
Status: Active » Closed (outdated)

Closing this as outdated, 6.x version is no longer maintained.