]> git.mxchange.org Git - mailer.git/blobdiff - inc/daily/daily_birthday.php
A lot has been rewritten, ext-teams added, ext-forced continued:
[mailer.git] / inc / daily / daily_birthday.php
index 42273b6f314564adfb3c0d85e8244a3b8f54181e..e9c4d83c86a6fcf5bafc5b22cbde613101afb5f6 100644 (file)
@@ -59,13 +59,13 @@ $year  = getYear();
 $lastOnline = '';
 
 // Shall I include only active members?
-if ((getConfig('birthday_active')  == 'Y') && (isExtensionActive('autopurge')) && (isBegActiveEnabled()) && ((getApInactiveSince() > 0))) {
-       $add = ' AND (UNIX_TIMESTAMP() - `last_online`) >= {?ap_inactive_since?}';
+if ((getConfig('birthday_active')  == 'Y') && (isExtensionActive('autopurge')) && ((getApInactiveSince() > 0))) {
+       $add = ' AND (UNIX_TIMESTAMP() - `last_online`) < {?ap_inactive_since?}';
 } // END - if
 
 // Only confirmed members shall receive birthday mails...
 $result_birthday = SQL_QUERY_ESC("SELECT
-       `userid`, `email`, `birth_year`
+       `userid`,`email`,`birth_year`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
@@ -99,7 +99,7 @@ if (!SQL_HASZERONUMS($result_birthday)) {
                        } // END - for
 
                        // Insert row into database
-                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`, `points`, `chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
+                       SQL_QUERY_ESC("INSERT INTO `{?_MYSQL_PREFIX?}_user_birthday` (`userid`,`points`,`chk_value`) VALUES (%s,{?birthday_points?},'%s' )",
                                array(
                                        bigintval($content['userid']),
                                        $content['check']