]> git.mxchange.org Git - mailer.git/blobdiff - inc/libs/beg_functions.php
Extension ext-coupon continued, naming convention, many improvements:
[mailer.git] / inc / libs / beg_functions.php
index 49b4beb6e62481a501b88e9a0130154491263a41..b3622839f1bbe93b30b84189018c7281b1bd16be 100644 (file)
@@ -54,11 +54,11 @@ function addPointsBeg ($userid, $points) {
                // Add points to account
                // @TODO Try to rewrite the following unset()
                unset($GLOBALS['ref_level']);
                // Add points to account
                // @TODO Try to rewrite the following unset()
                unset($GLOBALS['ref_level']);
-               $added = addPointsThroughReferalSystem('beg', $userid, $points, false, 0, strtolower(getBegMode()));
+               $added = addPointsThroughReferalSystem('beg', $userid, $points, false, 0, getBegMode());
        }
 
        // Subtract begged points from member account if the admin has selected one
        }
 
        // Subtract begged points from member account if the admin has selected one
-       if (getBegUserid() > 0) {
+       if (isValidUserId(getBegUserid())) {
                // Subtract from this account
                subtractPoints('beg_payout', getBegUserid(), $points);
        } // END - if
                // Subtract from this account
                subtractPoints('beg_payout', getBegUserid(), $points);
        } // END - if