How to check whether one's current User Points are negative with the Rules module? My question is pretty straightforward: how can I check whether a user's current amount of User Points is negative with the Rules module? I'd like to create an action that should be activated when the user is granted User Points. The event is set, but I don't know how I can set the condition.

Edit: I enabled the PHP filter module in order to get the 'Execute custom PHP code' option in my Rule's conditions. (I didn't know that I had to do this before...) I used this code to check whether the user's User Points are negative:

global $user;
$num_pts = userpoints_get_current_points($user-&gt;uid, 'all');
$neg_pts = $num_pts &lt; 0;


Unfortunately, it's always evaluated as 'false', even when the amount of User Points is negative. I've also tried this:

$num_pts = userpoints_get_current_points([userpoints-transaction:user]-&gt;uid, 'all');
$neg_pts = $num_pts &lt; 0;


But that didn't work either (same reason). I don't get any error messages in both cases.

Are these code snippets wrong? How does the correct one look like?
global $user;
$num_pts = userpoints_get_current_points($user-&gt;uid, 'all');
$neg_pts = $num_pts &lt; 0;