Function __global->cns_get_custom_field_mappings

Definitions

sources/cns_members.php

  • Returns a mapping of all raw field values for user.Doesn't take account of translation, anything permissive, or data conversion. Therefore only use if you are sure of the data you're getting.Automatically (re)creates missing data.Use cns_get_all_custom_fields_match_member if you want something smarter (but more intensive); that function is a wrapper around this function.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$member_id MEMBER No No required parameter N/A N/A The member

Returns

  • The mapping, field_<id> to value
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Returns a mapping of all raw field values for user.Doesn't take account of translation, anything permissive, or data conversion. Therefore only use if you are sure of the data you're getting.Automatically (re)creates missing data.Use cns_get_all_custom_fields_match_member if you want something smarter (but more intensive); that function is a wrapper around this function.
 *
 * @param  MEMBER $member_id The member
 * @return array The mapping, field_<id> to value
 */

function cns_get_custom_field_mappings(int $member_id) : array