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

    r834 r1060  
    3838if (iMEMBER) { 
    3939    // create the where clause 
     40    $filter = "user_status = 0";    // only show activated accounts 
    4041    if ($sortby == "all") { 
    41         if ($country == "") { 
    42             $orderby = ""; 
    43         } else { 
    44             $orderby = " user_cc_code = '".$country."'"; 
     42        if ($country != "") { 
     43            $filter .= " AND user_cc_code = '".$country."'"; 
    4544        } 
    4645    } else { 
    4746        if ($country == "") { 
    48             $orderby = " user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'"; 
     47            $filter .= " AND user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%'"; 
    4948        } else { 
    50             $orderby = " user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
     49            $filter .= " AND user_cc_code = '".$country."' AND (user_name LIKE '".stripinput($sortby)."%' OR user_name LIKE '".strtolower(stripinput($sortby))."%')"; 
    5150        } 
    5251    } 
     
    5453    $variables['members'] = array(); 
    5554    if (!isset($rowstart) || !isNum($rowstart)) $rowstart = 0; 
    56     $result = dbquery("SELECT * FROM ".$db_prefix."users".($orderby==""?"":" WHERE").$orderby." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".ITEMS_PER_PAGE); 
     55    $result = dbquery("SELECT * FROM ".$db_prefix."users ".($filter==""?"":("WHERE ".$filter))." ORDER BY user_level DESC, user_name LIMIT ".$rowstart.", ".ITEMS_PER_PAGE); 
    5756    $rows = dbrows($result); 
    5857    $variables['members'] = array(); 
     
    9392    if (count($variables['search'])%2) $variables['search'][] = ""; 
    9493    $variables['sortby'] = $sortby; 
    95     $variables['rows'] = dbcount("(*)", "users", $orderby); 
     94    $variables['rows'] = dbcount("(*)", "users", $filter); 
    9695    $variables['rowstart'] = $rowstart; 
    9796    $variables['items_per_page'] = ITEMS_PER_PAGE; 
Note: See TracChangeset for help on using the changeset viewer.