Referral_points doesn't check for positive

GabrielGadfly - March 31, 2009 - 02:59
Project:User Points Contributed modules
Version:5.x-3.0
Component:Code: referral_points
Category:bug report
Priority:normal
Assigned:Unassigned
Status:active
Description

Noticed something while testing referral_points. The multiplier works fine when points are being awarded, but the module doesn't check to see if the integer is positive, so whenever the referred user loses points, so does the referrer. For example, when referral_points is set to 10%:

Referred User lost 10 points.
Referring User lost 1 point.

I plan on using the Ecommerce points-as-payment option, but I'd like to make sure my referrers don't lose points when my referred users buy something. Is there any way to modify the code in referral_points.module to make it so it only adds points and never subtracts them?

 
 

Drupal is a registered trademark of Dries Buytaert.