X-Git-Url: https://git.mxchange.org/?a=blobdiff_plain;f=inc%2Fpool%2Fpool-user.php;h=290770b259efebda033070b18e570d41342cbeb2;hb=d4cff9c73632a8d93428a80dcf54b3a8daa80a24;hp=c9bee512e0a5c9bed25288761e405a53f733ec13;hpb=29385a0483bbcbbe940a32a49d488b1d5add15c5;p=mailer.git diff --git a/inc/pool/pool-user.php b/inc/pool/pool-user.php index c9bee512e0..290770b259 100644 --- a/inc/pool/pool-user.php +++ b/inc/pool/pool-user.php @@ -40,7 +40,7 @@ // Some security stuff... if (!defined('__SECURITY')) { die(); -} +} // END - if // Don't run on daily reset if (isResetModeEnabled()) { @@ -63,7 +63,7 @@ if (isExtensionActive('html_mail')) { // Reset variables $cnt2 = '0'; $lastSentId = '0'; $cnt_back = array(0); $pointsBack = array(0); -if (SQL_NUMROWS($result_main) > 0) { +if (!SQL_HASZERONUMS($result_main)) { // Parse all mails while ($DATA = SQL_FETCHARRAY($result_main, 0, false)) { // Set mail order as 'active'. That means it will be sent out @@ -238,7 +238,7 @@ if (SQL_NUMROWS($result_main) > 0) { 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_NUMROWS($result_main) > 0) { // 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