]> git.mxchange.org Git - mailer.git/blobdiff - doubler.php
More rewrites to make use of (cached) wrapper functions
[mailer.git] / doubler.php
index 635448e77b3de39a2c0c33f814b16c056abaed69..8685143cf2f2f935ab93a199e9f15c76424c3fe9 100644 (file)
@@ -117,7 +117,7 @@ if (isFormSent()) {
                                incrementConfigEntry('doubler_points', $points);
 
                                // Add second line for the referal but only when userid != refid
-                               if ((determineReferalId() > 0) && (determineReferalId() != getUserData('userid'))) {
+                               if ((isValidUserId(determineReferalId())) && (determineReferalId() != getUserData('userid'))) {
                                        // Okay add a refid line and apply refid percents
                                        SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_doubler` (`userid`, `refid`, `points`, `remote_ip`, `timemark`, `completed`, `is_ref`) VALUES ('%s',0,'%s','".detectRemoteAddr()."',UNIX_TIMESTAMP(),'N','Y')",
                                                array(