Function __global->cns_edit_member

Definitions

sources/cns_members_action2.php

  • Edit a member.
  • Visibility: public
  • Is abstract?: No
  • Is static?: No
  • Is final?: No

Parameters

Name Type Passed by reference? Variadic? Default Set Range Description
$member_id AUTO_LINK No No required parameter N/A N/A The ID of the member
$username ?string No No Null N/A N/A The username (null: don't change)
$password ?string No No Null N/A N/A The password, plain-text if compat scheme is software-based, else hashed (null: don't change)
$email_address ?SHORT_TEXT No No Null N/A N/A The e-mail address (null: don't change)
$primary_group ?GROUP No No Null N/A N/A The member's primary usergroup (null: don't change) (you must handle updating group approvals manually)
$dob_day ?integer No No Null N/A N/A Day of date of birth (null: don't change) (-1: unset)
$dob_month ?integer No No Null N/A N/A Month of date of birth (null: don't change) (-1: unset)
$dob_year ?integer No No Null N/A N/A Year of date of birth (null: don't change) (-1: unset)
$custom_fields ?array No No Null N/A N/A A map of custom fields values, things specified are not (field-id=>value) (null: don't change)
$timezone ?ID_TEXT No No Null N/A N/A The member timezone (null: don't change)
$region ?ID_TEXT No No Null N/A N/A The member region (null: don't change)
$language ?LANGUAGE_NAME No No Null N/A N/A The member's language (null: don't change)
$theme ?ID_TEXT No No Null N/A N/A The member's default theme (null: don't change)
$title ?SHORT_TEXT No No Null N/A N/A The member's title (blank: get from primary) (null: don't change)
$photo_url ?URLPATH No No Null N/A N/A Photo URL (null: don't change)
$avatar_url ?URLPATH No No Null N/A N/A Avatar (null: don't change)
$signature ?LONG_TEXT No No Null N/A N/A Signature (null: don't change)
$preview_posts ?BINARY No No Null N/A N/A Whether posts are previewed before they are made (null: don't change)
$reveal_age ?BINARY No No Null N/A N/A Whether the member's age may be shown (null: don't change)
$views_signatures ?BINARY No No Null N/A N/A Whether the member sees signatures in posts (null: don't change)
$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: don't change)
$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: don't change)
$mailing_list_style ?BINARY No No Null N/A N/A Whether to send mailing-list style notifications (null: don't change)
$auto_mark_read ?BINARY No No Null N/A N/A Mark topics as read automatically (null: don't change)
$sound_enabled ?BINARY No No Null N/A N/A Whether sound is enabled (null: don't change)

Preview

Code (PHP)

/**
 * Edit a member.
 *
 * @param  AUTO_LINK $member_id The ID of the member
 * @param  ?string $username The username (null: don't change)
 * @param  ?string $password The password, plain-text if compat scheme is software-based, else hashed (null: don't change)
 * @param  ?SHORT_TEXT $email_address The e-mail address (null: don't change)
 * @param  ?GROUP $primary_group The member's primary usergroup (null: don't change) (you must handle updating group approvals manually)
 * @param  ?integer $dob_day Day of date of birth (null: don't change) (-1: unset)
 * @param  ?integer $dob_month Month of date of birth (null: don't change) (-1: unset)
 * @param  ?integer $dob_year Year of date of birth (null: don't change) (-1: unset)
 * @param  ?array $custom_fields A map of custom fields values, things specified are not (field-id=>value) (null: don't change)
 * @param  ?ID_TEXT $timezone The member timezone (null: don't change)
 * @param  ?ID_TEXT $region The member region (null: don't change)
 * @param  ?LANGUAGE_NAME $language The member's language (null: don't change)
 * @param  ?ID_TEXT $theme The member's default theme (null: don't change)
 * @param  ?SHORT_TEXT $title The member's title (blank: get from primary) (null: don't change)
 * @param  ?URLPATH $photo_url Photo URL (null: don't change)
 * @param  ?URLPATH $avatar_url Avatar (null: don't change)
 * @param  ?LONG_TEXT $signature Signature (null: don't change)
 * @param  ?BINARY $preview_posts Whether posts are previewed before they are made (null: don't change)
 * @param  ?BINARY $reveal_age Whether the member's age may be shown (null: don't change)
 * @param  ?BINARY $views_signatures Whether the member sees signatures in posts (null: don't change)
 * @param  ?BINARY $auto_monitor_contrib_content Whether the member automatically is enabled for notifications for content they contribute to (null: don't change)
 * @param  ?BINARY $smart_topic_notification Whether to do smart topic notification [i.e. avoid sending so many notifications] (null: don't change)
 * @param  ?BINARY $mailing_list_style Whether to send mailing-list style notifications (null: don't change)
 * @param  ?BINARY $auto_mark_read Mark topics as read automatically (null: don't change)
 * @param  ?BINARY $sound_enabled Whether sound is enabled (null: don't change)
 */

function cns_edit_member(int $member_id, ?string $username = null, ?string $password = null, ?string $email_address = null, ?int $primary_group = null, ?int $dob_day = null, ?int $dob_month = null, ?int $dob_year = null, ?array $custom_fields = null, ?string $timezone = null, ?string $region = null, ?string $language = null, ?string $theme = null, ?string $title = null, ?string $photo_url = null, ?string $avatar_url = null, ?string $signature = null, ?int $preview_posts = null, ?int $reveal_age = null, ?int $views_signatures = null, ?int $auto_monitor_contrib_content = null, ?int $smart_topic_notification = null, ?int $mailing_list_style = null, ?int $auto_mark_read = null, ?int $sound_enabled = null)