Need to search by the term given in $_REQUEST
)
AND T.status = " . $this->config['status_numb']['Active'];
+ if ( isset( $_REQUEST['term'] ) && !empty( $_REQUEST['term'] ) ) {
+ $textSearch = addslashes(filter_var($_REQUEST['term'], FILTER_SANITIZE_STRING, FILTER_FLAG_NO_ENCODE_QUOTES));
+ $whereParts[] = " T.member in (
+ SELECT DISTINCT(id)
+ FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX."members
+ WHERE name like '%$textSearch%'
+ )";
+ }
+
$where = implode( ' AND ', $whereParts );
$members = $this->wpdb->get_results(