]> git.mxchange.org Git - mailer.git/blobdiff - inc/referral-functions.php
Swapped all
[mailer.git] / inc / referral-functions.php
index 267fd279638bd8556924cf3df6a1b5e4f733f66c..4bb7e4305ba065d0a2311e68ad9f3664221f207b 100644 (file)
@@ -277,7 +277,7 @@ function addPointsThroughReferralSystem ($subject, $userid, $points, $refid = NU
 
                        // Maybe there's another ref?
                        //* DEBUG: */ logDebugMessage(__FUNCTION__, __LINE__, 'points=' . $points . ',refid(var|data)=' . convertNullToZero($refid) . '|' . convertNullToZero(getUserData('refid')) . ',userid=' . $userid . ',paymentMethod=' . $paymentMethod . ',subject=' . $subject . ',ref_level=' . $GLOBALS['ref_level']);
-                       if ((isValidId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid) && ($paymentMethod == 'REFERRAL')) {
+                       if (($paymentMethod == 'REFERRAL') && (isValidId(getUserData('refid'))) && ($points > 0) && (getUserData('refid') != $userid)) {
                                // Is _ref there?
                                if (substr($subject, -4, 4) == '_ref') {
                                        // Then remove it, no double _ref suffix!