]> git.mxchange.org Git - mailer.git/blobdiff - inc/mysql-manager.php
Naming convention applied, new API function introduced:
[mailer.git] / inc / mysql-manager.php
index 460145e7bb57b12374d97676a318940bb9c02e61..874884fd8809d0e517ff1b928ef92604bf58ceeb 100644 (file)
@@ -1023,7 +1023,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
        //* DEBUG: */ debugOutput(__FUNCTION__ . '(<font color="#0000aa">' . __LINE__ . '</font>):userid='.$userid.',points='.$points);
        if (fetchUserData($userid)) {
                // Determine wether the user has some mails to click before he/she gets the points
-               $locked = ((getUserData('ref_payout') > 0) && (!isDirectPaymentEnabled()));
+               $locked = ifUserPointsLocked($userid);
 
                // Default is 'normal' points
                $data = 'points';
@@ -1095,7 +1095,7 @@ function addPointsThroughReferalSystem ($subject, $userid, $points, $sendNotify
 
                                // Send email
                                sendEmail($userid, '{--THANX_REFERAL_ONE_SUBJECT--}', $message);
-                       } elseif (($sendNotify === true) && (getUserData('refid') == '0') && ($locked === false) && ($add_mode == 'direct')) {
+                       } elseif (($sendNotify === true) && (!isValidUserId(getUserData('refid'))) && ($locked === false) && ($add_mode == 'direct')) {
                                // Prepare content
                                $content = array(
                                        'reason' => '{--REASON_DIRECT_PAYMENT--}',