Function __global->cns_get_member_fields_settings

Definitions

sources/cns_members_action2.php

  • Get form fields for adding/editing/finishing a member account: settings 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
$special_type ID_TEXT No No Blank (empty string) N/A N/A The special type of profile this is (blank: not a special type)
$member_id ?MEMBER No No Null N/A N/A The ID of the member we are handling (null: new member)
$username SHORT_TEXT No No Blank (empty string) N/A N/A The username
$email_address SHORT_TEXT No No Blank (empty string) N/A N/A The e-mail address
$primary_group ?GROUP No No Null N/A N/A The member's primary usergroup (null: not known)
$groups ?array No No Null N/A N/A A list of usergroups (null: default usergroups)
$dob_day ?integer No No Null N/A N/A Day of date of birth (null: not known)
$dob_month ?integer No No Null N/A N/A Month of date of birth (null: not known)
$dob_year ?integer No No Null N/A N/A Year of date of birth (null: not known)
$timezone ?ID_TEXT No No Null N/A N/A The member timezone (null: site default)
$region ?ID_TEXT No No Null N/A N/A The member region (null: not known)
$language ?LANGUAGE_NAME No No Null N/A N/A The member's language (null: auto detect)
$theme ?ID_TEXT No No Null N/A N/A The member's default theme (null: not known)
$preview_posts ?BINARY No No Null N/A N/A Whether posts are previewed before they are made (null: calculate statistically)
$reveal_age BINARY No No 1 N/A N/A Whether the member's age may be shown
$views_signatures BINARY No No 1 N/A N/A Whether the member sees signatures in posts
$auto_monitor_contrib_content ?BINARY No No Null N/A N/A Whether the member automatically is enabled for notifications for content they contribute to (null: get default from config)
$smart_topic_notification ?BINARY No No Null N/A N/A Whether to do smart topic notification [i.e. avoid sending so many notifications] (null: global configured default)
$mailing_list_style ?BINARY No No Null N/A N/A Whether to send mailing-list style notifications (null: global configured default)
$auto_mark_read BINARY No No 1 N/A N/A Mark topics as read automatically
$sound_enabled ?BINARY No No Null N/A N/A Whether sound is enabled (null: global configured default)
$allow_emails BINARY No No 1 N/A N/A Whether the member allows e-mails via the site
$allow_emails_from_staff BINARY No No 1 N/A N/A Whether the member allows e-mails from staff via the site
$highlighted_name BINARY No No 0 N/A N/A Whether the member username will be highlighted

Returns

  • A pair: 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: settings only.
 *
 * @param  boolean $mini_mode Whether we are only handling the essential details of a profile
 * @param  ID_TEXT $special_type The special type of profile this is (blank: not a special type)
 * @param  ?MEMBER $member_id The ID of the member we are handling (null: new member)
 * @param  SHORT_TEXT $username The username
 * @param  SHORT_TEXT $email_address The e-mail address
 * @param  ?GROUP $primary_group The member's primary usergroup (null: not known)
 * @param  ?array $groups A list of usergroups (null: default usergroups)
 * @param  ?integer $dob_day Day of date of birth (null: not known)
 * @param  ?integer $dob_month Month of date of birth (null: not known)
 * @param  ?integer $dob_year Year of date of birth (null: not known)
 * @param  ?ID_TEXT $timezone The member timezone (null: site default)
 * @param  ?ID_TEXT $region The member region (null: not known)
 * @param  ?LANGUAGE_NAME $language The member's language (null: auto detect)
 * @param  ?ID_TEXT $theme The member's default theme (null: not known)
 * @param  ?BINARY $preview_posts Whether posts are previewed before they are made (null: calculate statistically)
 * @param  BINARY $reveal_age Whether the member's age may be shown
 * @param  BINARY $views_signatures Whether the member sees signatures in posts
 * @param  ?BINARY $auto_monitor_contrib_content Whether the member automatically is enabled for notifications for content they contribute to (null: get default from config)
 * @param  ?BINARY $smart_topic_notification Whether to do smart topic notification [i.e. avoid sending so many notifications] (null: global configured default)
 * @param  ?BINARY $mailing_list_style Whether to send mailing-list style notifications (null: global configured default)
 * @param  BINARY $auto_mark_read Mark topics as read automatically
 * @param  ?BINARY $sound_enabled Whether sound is enabled (null: global configured default)
 * @param  BINARY $allow_emails Whether the member allows e-mails via the site
 * @param  BINARY $allow_emails_from_staff Whether the member allows e-mails from staff via the site
 * @param  BINARY $highlighted_name Whether the member username will be highlighted
 * @return array A pair: The form fields, Hidden fields (both Tempcode), Whether separate sections were used
 */

function cns_get_member_fields_settings(bool $mini_mode = true, string $special_type = '', ?int $member_id = null, string $username = '', string $email_address = '', ?int $primary_group = null, ?array $groups = null, ?int $dob_day = null, ?int $dob_month = null, ?int $dob_year = null, ?string $timezone = null, ?string $region = null, ?string $language = null, ?string $theme = null, ?int $preview_posts = null, int $reveal_age = 1, int $views_signatures = 1, ?int $auto_monitor_contrib_content = null, ?int $smart_topic_notification = null, ?int $mailing_list_style = null, int $auto_mark_read = 1, ?int $sound_enabled = null, int $allow_emails = 1, int $allow_emails_from_staff = 1, int $highlighted_name = 0) : array