}
}
- // Determine if current user can add, edit, delete member data
-// $canEdit = current_user_can('glm_members_edit');
-
// Compile template data
$templateData = array(
'haveMembers' => $haveMembers,
}
- /*
- * Entry Post Processing Call-Back Method
- *
- * Perform post-processing for all result entries.
- *
- * In this case we're using it to append an array of category
- * data to each member result.
- *
- * @param array $r Array of field result data for a single entry
- * @param string $a Action being performed (l, i, g, ...)
- *
- * @return object Class object
- *
- */
- public function entryPostProcessing($r, $a)
- {
-
- // Only run these tests for 'l' (getList)
- if ($a != 'l') {
- return $r;
- }
-
- // Get Member Category data for this entry
- $sql = "
- SELECT CMI.member_info AS member_info_id, C.id, C.name, C.descr, C.short_descr,
- COALESCE (
- (
- SELECT name
- FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX. "categories
- WHERE id = C.parent
- ), ''
- ) AS parent_name
- FROM ".GLM_MEMBERS_PLUGIN_DB_PREFIX. "categories AS C,
- ".GLM_MEMBERS_PLUGIN_DB_PREFIX. "category_member_info AS CMI
- WHERE C.id = CMI.category
- AND CMI.member_info = ".$r['id']."
- ;";
- $r['categories'] = $this->wpdb->get_results($sql, ARRAY_A);
-
- // Required
- return $r;
- }
-
-
-
}