]> git.mxchange.org Git - mailer.git/blobdiff - inc/pool/pool-user.php
Fix for broken confirmation
[mailer.git] / inc / pool / pool-user.php
index b9fffa4cf1abaa0c533d631cac26ec90cb9562fd..290770b259efebda033070b18e570d41342cbeb2 100644 (file)
@@ -40,7 +40,7 @@
 // Some security stuff...
 if (!defined('__SECURITY')) {
        die();
-}
+} // END - if
 
 // Don't run on daily reset
 if (isResetModeEnabled()) {
@@ -238,7 +238,7 @@ if (!SQL_HASZERONUMS($result_main)) {
                                                        array(bigintval($DATA['id'])), __FILE__, __LINE__);
                                        } else {
                                                // Is the userid set?
-                                               if ($userid > 0) {
+                                               if (isValidUserId($userid)) {
                                                        // User does not exists, pay points back
                                                        $points = getPaymentPoints($DATA['payment_id']);
                                                        addPointsDirectly('pool_payback', $DATA['sender'], $points);
@@ -267,7 +267,7 @@ if (!SQL_HASZERONUMS($result_main)) {
                // Walk through all points
                foreach ($pointsBack as $userid => $PB) {
                        // Add points only when we have points left to add and a valid user id
-                       if (($PB > 0) && ($userid > 0)) {
+                       if (($PB > 0) && (isValidUserId($userid))) {
                                // Prepare content
                                $content = array(
                                        'points' => $PB