Fix for inserted codes while registering of extensions, many rewrites/cleanups:
[mailer.git] / inc / reset / reset_profile.php
index 16001ed8566ee68602f37c140d76cd35bbf6c660..42d95ce89b233677645fcee2ca067600df960937 100644 (file)
@@ -51,17 +51,17 @@ if (!defined('__SECURITY')) {
 
 if ((getConfig('send_prof_update') == 'Y') && (getConfig('profile_update') > 0) && (getConfig('resend_profile_update'))) {
        // Load personal data
-       $result = SQL_QUERY("SELECT `userid`, `email`, `last_update`, `joined`
+       $result = SQL_QUERY('SELECT `userid`, `email`, `last_update`, `joined`
 FROM
        `{?_MYSQL_PREFIX?}_user_data`
 WHERE
        (`last_update` < (UNIX_TIMESTAMP() - {?profile_update?}) AND
-       `last_update` != 0 AND
+       `last_update` > 0 AND
        `last_profile_sent` < (UNIX_TIMESTAMP() - {?resend_profile_update?}))
 OR
-       (`last_update` = '0' AND `last_profile_sent` = '0' AND `joined` < (UNIX_TIMESTAMP() - {?profile_update?}))
+       (`last_update` = 0 AND `last_profile_sent` = 0 AND `joined` < (UNIX_TIMESTAMP() - {?profile_update?}))
 ORDER BY
-       `userid` ASC", __FILE__, __LINE__);
+       `userid` ASC', __FILE__, __LINE__);
 
        // Do we have some notifications to sent?
        if (!SQL_HASZERONUMS($result)) {