Function __global->cns_get_member_fields_profile

Definitions

sources/cns_members_action2.php

  • Get form fields for adding/editing/finishing a member account: profile fields only.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No
  • Returns: array

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$mini_mode boolean No No True N/A N/A Whether we are only handling the essential details of a profile
$member_id ?MEMBER No No Null N/A N/A The ID of the member we are handling (null: new member)
$groups ?array No No Null N/A N/A A list of usergroups (null: default/current usergroups)
$custom_fields ?array No No Null N/A N/A A map of custom fields values (field-id=>value) (null: not known)
$adjusted_config_options array No No [] N/A N/A A map of adjusted config options

Returns

  • A tuple: The form fields, Hidden fields (both Tempcode), Whether separate sections were used
  • Type: array
  • Set: N/A
  • Range: N/A

Preview

Code (PHP)

/**
 * Get form fields for adding/editing/finishing a member account: profile fields only.
 *
 * @param  boolean $mini_mode Whether we are only handling the essential details of a profile
 * @param  ?MEMBER $member_id The ID of the member we are handling (null: new member)
 * @param  ?array $groups A list of usergroups (null: default/current usergroups)
 * @param  ?array $custom_fields A map of custom fields values (field-id=>value) (null: not known)
 * @param  array $adjusted_config_options A map of adjusted config options
 * @return array A tuple: The form fields, Hidden fields (both Tempcode), Whether separate sections were used
 */

function cns_get_member_fields_profile(bool $mini_mode = true, ?int $member_id = null, ?array $groups = null, ?array $custom_fields = null, array $adjusted_config_options = []) : array