]> git.mxchange.org Git - mailer.git/blobdiff - inc/reset/reset_profile.php
Fix for trying to get a message from a message (no id)
[mailer.git] / inc / reset / reset_profile.php
index 560e9cb4b4a31dcfae39cd6595d08f11c771aa53..94bdeead11e42321d8d081747f23970aad614be4 100644 (file)
@@ -56,7 +56,7 @@ FROM
 WHERE
        (`last_update` < (UNIX_TIMESTAMP() - %s) AND `last_update` != 0 AND `last_profile_sent` < (UNIX_TIMESTAMP() - %s))
 OR
-       (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - %s))
+       (`last_update` = '0' AND `last_profile_sent` = '0' AND `joined` < (UNIX_TIMESTAMP() - %s))
 ORDER BY
        `userid` ASC",
                array(
@@ -72,7 +72,7 @@ ORDER BY
                        // Translate timestamp
                        $content['joined'] = generateDateTime($content['joined'], 0);
 
-                       if (round($content['last_update']) == 0) {
+                       if (round($content['last_update']) == '0') {
                                // Has never changed his accont
                                $content['last_update'] = getMessage('PROFILE_NEVER_CHANGED');
                        } else {
@@ -81,7 +81,7 @@ ORDER BY
                        }
 
                        // Load email template and send mail away
-                       $message = loadEmailTemplate('profile-updte', '', bigintval($content['userid']));
+                       $message = loadEmailTemplate('profile-updte', $content, bigintval($content['userid']));
                        sendEmail($content['email'], getMessage('PROFILE_OUTDATED'), $message);
 
                        // Update profile data