Hi,

I am trying to deduct userpoints from a user if they are inactive using rules.

Event: user logged in

Condition: php: return intval((time() – $account->access)/60) > 3;
(this should allow the user 3 minutes interval where if they log in they will not be penalised)

Action: grant userpoints -30

It all seems fine to me but isn't working for some reason.

Can somebody point out the error please?

Thanks,

Shaun

Comments

dRaz’s picture

Can somebody give me a hand please.

Bundberg’s picture

Can you explain the problem in more details.

dRaz’s picture

Sure, I'll try :)

I am trying to write a rule that does the following:

When a user logs in, the system checks to see whether it has been (for testing purposes) 3 minutes or longer since they last logged in.

If it has then they lose 30 points.

My rule is detailed in the top post - that is how I have it set up at the moment but it is not deducting the points for some reason? All looks right to me....

dRaz’s picture

Can nobody help?

Bundberg’s picture

Really sorry, Googled about this issue but did not find answer