Changeset 1060 in ExiteCMS for trunk/includes/theme_functions.php


Ignore:
Timestamp:
11/05/07 21:36:09 (5 years ago)
Author:
hverton
Message:

Added a feature to handle invalid member email addresses. Once a user has been marked to have an invalid address, a login will redirect to the edit_profile module and the user will be prompted to correct the address. If this doesn't happen within 90 days, the user account will be deactivated and will disappear from the member lists. The account is not deleted or disabled, a login will reactivate the account again (and the 90 day countdown timer will start again).

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/includes/theme_functions.php

    r954 r1060  
    415415        $result = dbquery("DELETE FROM ".$db_prefix."new_users WHERE user_datestamp < '".(time() - $day * 3)."'"); 
    416416        // unread posts indicators: set to 30 days 
    417         $result = dbquery("DELETE FROM ".$db_prefix."posts_unread WHERE post_time < ".(time() - $day * 30), false); 
     417        $result = dbquery("DELETE FROM ".$db_prefix."posts_unread WHERE post_time < '".(time() - $day * 30)."'", false); 
     418        // deactivate accounts with a bad email address after 90 days 
     419        $result = dbquery("UPDATE ".$db_prefix."users SET user_status = 1, user_ban_reason = '', user_ban_expire = '".time()."' WHERE user_bad_email > 0 AND user_bad_email < '".(time() - $day * 90)."'"); 
    418420    } 
    419421     
     
    428430 
    429431    echo "</body>\n</html>\n"; 
     432 
     433    // store the current URL in a cookie. We might need to redirect to it later 
     434    setcookie('last_url', FUSION_REQUEST, 0, '/'); 
    430435     
    431436    // and flush any output remaining 
Note: See TracChangeset for help on using the changeset viewer.