Changeset 1060 in ExiteCMS for trunk/includes/user_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/user_functions.php

    r1057 r1060  
    4343    if (dbrows($result) != 0) { 
    4444        $data = dbarray($result); 
    45         $cookie_value = $data['user_id'].".".$user_pass; 
    4645        // if the account is suspended, check for an expiry date 
    4746        if ($data['user_status'] == 1 && $data['user_ban_expire'] > 0 && $data['user_ban_expire'] < time() ) { 
     47            // if this user's email address is marked as bad, reset the countdown counter 
     48            $data['user_bad_email'] = $data['user_bad_email'] == 0 ? 0 : time(); 
    4849            // reset the user status and the expiry date 
    49             $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_ban_expire='0' WHERE user_id='".$data['user_id']."'"); 
     50            $result = dbquery("UPDATE ".$db_prefix."users SET user_status='0', user_ban_expire='0', user_bad_email = '".$data['user_bad_email']."' WHERE user_id='".$data['user_id']."'"); 
    5051            $data['user_status'] = 0; 
    5152        } 
     
    6162            // HV - end of code change 
    6263            header("P3P: CP='NOI ADM DEV PSAi COM NAV OUR OTRo STP IND DEM'"); 
     64            $cookie_value = $data['user_id'].".".$user_pass; 
    6365            setcookie("userinfo", $cookie_value, $cookie_exp, "/", "", "0"); 
    6466            redirect(BASEDIR."setuser.php?user=".$data['user_name'], "script"); 
Note: See TracChangeset for help on using the changeset viewer.