);
// Only return information records that are active
- $where .= " AND status = ".$this->config['status_numb']['Active'];
// Check if this is a request to show archived members
if (isset($_REQUEST['filterArchived'])) {
- $where .= " AND access = ".$this->config['access_numb']['Archived'];
+ $where .= " AND T.status = ".$this->config['access_numb']['Archived'];
$filterArchived = true;
$haveFilter = true;
// If not, don't show them
} else {
-// $where .= " AND access != ".$this->config['access_numb']['Archived'];
+ $where .= " AND T.status = ".$this->config['status_numb']['Active'];
}
// Check for a text search
}
$where .= " AND T.id in (
- SELECT DISTINCT(I.member)
+ SELECT DISTINCT(I.id)
FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."member_info I,
".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info M,
".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories C
WHERE I.id = M.member_info
+ AND I.status = " . ( isset( $_REQUEST['filterArchived'] ) ? $this->config['status_numb']['Archived']: $this->config['status_numb']['Active'] )."
AND (
M.category in ($cats)
OR (C.parent in ($cats) AND M.category = C.id)
$category_data = $this->wpdb->get_results( $sql, ARRAY_A );
//echo '<pre>$category_data: ' . print_r( $category_data, true ) . '</pre>';
+ //echo '<pre>$where: ' . print_r( $where, true ) . '</pre>';
// Get a current list of members without paging
$list = $this->getList($where, "member_name");
//echo '<pre>$list: ' . print_r( $list, true ) . '</pre>';
".GLM_MEMBERS_PLUGIN_DB_PREFIX."category_member_info M,
".GLM_MEMBERS_PLUGIN_DB_PREFIX."categories C
WHERE I.id = M.member_info
+ AND I.status != " . $this->config['status_numb']['Archived'] ."
AND (
M.category in ($cats)
OR (C.parent in ($cats) AND M.category = C.id)