Служебные инструменты · main

Дополнительные поля · изменения · Изменить дополнительное поле пользователя

main_user_fields_m033_writeИзменение

Изменить дополнительное поле пользователя.

Действия

В tools/call передайте имя инструмента, значение action и параметры действия во вложенном объекте arguments.

Подготовить загрузку файла пользовательского поля

account_custom_file_pending_create

Изменить дополнительное поле пользователя.

user_id
целое число · обязательный параметр
field_id
целое число · обязательный параметр
operation
строка · обязательный параметр
request_id
строка · обязательный параметр
expected_revision
строка · обязательный параметр
preview_fingerprint
строка
confirm
логическое значение · обязательный параметр
value
объект · обязательный параметр
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "field_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647
    },
    "operation": {
      "type": "string",
      "enum": [
        "preview",
        "apply",
        "status"
      ]
    },
    "request_id": {
      "type": "string",
      "minLength": 32,
      "maxLength": 32,
      "pattern": "^[a-f0-9]{32}$"
    },
    "expected_revision": {
      "type": "string",
      "minLength": 64,
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "preview_fingerprint": {
      "type": "string",
      "minLength": 64,
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "confirm": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "value": {
      "type": "object",
      "properties": {
        "upload": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "content_base64": {
              "type": "string",
              "maxLength": 128000
            },
            "content_type": {
              "type": "string",
              "minLength": 3,
              "maxLength": 128
            }
          },
          "required": [
            "name",
            "content_base64",
            "content_type"
          ],
          "additionalProperties": false
        }
      },
      "required": [
        "upload"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "user_id",
    "field_id",
    "operation",
    "request_id",
    "expected_revision",
    "confirm",
    "value"
  ],
  "additionalProperties": false
}

Скачать исходное примечание

Изменить дополнительное поле пользователя

account_custom_value_update

Изменяет выбранное дополнительное поле пользователя штатным API Bitrix. Одиночное поле принимает значение своего типа: текст, целое число строкой, true/false, ID варианта списка, десятичное число строкой, дату YYYY-MM-DD или местное время YYYY-MM-DDTHH:mm:ss. Для связи с разделом или элементом передайте его ID; доступ к связанной записи проверяется отдельно. Файлы и предпросмотр ссылок доступны только для чтения ID. Множественное поле принимает список значений: ["Красный","Синий","Красный"] для строк, [0,-2,10] для целых чисел, [true,false,true] для логических значений, [12,15,12] для вариантов списка. Порядок и повторы сохраняются; пустые строки штатный обработчик пропускает. [] очищает необязательное поле; null не обозначает очистку множественного поля. Перед записью получите текущую revision и передайте её как expected_revision вместе с confirm=true. Одинаковый список сохраняется без записи и без изменения ID его строк. При изменении списка Bitrix создаёт новые ID только для его значений. Логическое множественное поле поддерживается как существующее поле штатного PHP API; создание такого поля в интерфейсе Bitrix не обещается. Пользователь №1 и текущий администратор защищены от записи. После ошибки с неопределённым результатом сначала прочитайте значение; автоматического повтора нет. For an optional SINGLE HL reference, hl_reference_write_profile=single_clear on GET and UPDATE supplies a separate complete write revision. A genuine administrator may clear one positive existing relation on an existing user, including USER1 and the current administrator, with value=null and confirm=true. Existing UTS and full raw UTS/UTM preservation are required. The separate single_attach_repoint profile accepts a positive existing target ID for an optional or mandatory searchable or nonsearchable SINGLE field after native block ACL, compiler-graph and per-item membership checks, repeated before and after original CUser Update. Mandatory fields cannot be cleared. SINGLE attach may create the first UTS row when all existing non-key columns are nullable with NULL defaults and the whole-user UTM set is empty, and original-session metadata proves a base InnoDB table without triggers under direct effective TRIGGER visibility; the full resulting raw row is verified. The separate multiple_replace profile accepts an ordered list of up to1024 positive existing target IDs in an initialized optional or mandatory searchable or nonsearchable MULTIPLE HL field; mandatory fields require at least one ID, [] clears optional fields only, order and repeats remain, and the resulting whole USER UTM graph is at most1024 rows. It requires the same profile on GET/UPDATE, a complete raw UTS/all-UTM revision and native per-target ACL/membership rechecks. Internal UTM IDs are not returned or claimed owned. Every explicit multiple_replace revision additionally requires original-session base-InnoDB/no-trigger/direct-TRIGGER visibility and exact DDL for both fixed b_uts_user and b_utm_user; these witnesses are repeated before the original owner and retained in the complete postimage. Only the generated b_utm_user table-option AUTO_INCREMENT counter may advance in a changed-write postimage; GET revision and final pre-owner raw DDL stay exact, while column AUTO_INCREMENT and every other DDL byte remain bound. Direct global SELECT metadata visibility, no incoming UTM DELETE cascades and no incoming selected-column UTS UPDATE cascades are also required for both first and initialized rows; unknown visibility refuses. Secondary UNIQUE indexes on b_uts_user are refused because native MySQL merge can otherwise update another user on a non-primary conflict. MULTIPLE also admits first-row initialization by a nonempty list only under the same qualified base-InnoDB/no-trigger/direct-TRIGGER visibility for both fixed b_uts_user and b_utm_user insert tables checks, an empty whole-user UTM set and nullable NULL-default non-key columns. Empty first-row input and existing-row NULL lists remain unsupported; no mixed resource fallback. Selected self profiles preserve raw revisions and verify only original native timestamp, authentication, session NAME and current-user cache effects. Normal native CUser effects run; uncertain attempts must not be retried automatically. Ordinary HL read revisions cannot authorize this write. Множественное поле «Ссылка» поддерживает упорядоченный список текста: Bitrix проверяет длину исходного значения, затем удаляет пробелы по краям каждого элемента и исключает пустые результаты. Повторы сохраняются. Адреса не открываются, метаданные ссылок не загружаются. Необязательные непоисковые множественные даты без значения по умолчанию поддерживают список YYYY-MM-DD; порядок и повторы сохраняются, [] очищает список, null не заменяет список. Необязательное непоисковое множественное время без значения по умолчанию поддерживает список YYYY-MM-DDTHH:mm:ss при USE_TIMEZONE=N. Это время без смещения; UTC и часовые пояса не преобразуются. Порядок и повторы сохраняются, [] очищает список. Optional nonsearchable MULTIPLE double accepts ordered decimal strings such as ["0.1","-2.50"]. Original Bitrix rounding and finite approximate DOUBLE storage apply; order and duplicates are retained; [] clears the list. Optional nonsearchable MULTIPLE formatted strings expose raw stored text. PATTERN is not rendered or applied. Order, whitespace and duplicates are retained; original Bitrix omits empty items; [] clears the list. Для одиночного необязательного поля «Файл» или «Предпросмотр ссылки» поддерживается только снятие ссылки: value=null, актуальный expected_revision и confirm=true. Сам файл, общие метаданные и изображение не удаляются. Прикрепление ID, загрузка файла и получение предпросмотра недоступны. Optional nonsearchable MULTIPLE section references accept positive integer IDs. Every target must belong to the configured IBlock and pass current original section read permissions and ACTIVE_FILTER. Order and duplicates are retained; [] clears the list. Optional nonsearchable MULTIPLE element references accept positive integer IDs. Every target must belong to the configured IBlock and pass current original element read permissions and ACTIVE_FILTER. Order and duplicates are retained; [] clears the list. SINGLE FILE accepts {upload:{name,content_base64,content_type}} up to4MiB through native CUser/FileType/CFile. Replacement preserves the previous shared file. An upload always attempts a new native file, including identical content; arbitrary stored file IDs are not accepted. For an absent USER UTS row, FILE get returns row_exists=false and value=null without creating storage. A confirmed native owned upload may create its first row; clearing an absent relation is unavailable. A SINGLE link preview accepts its existing original signed token as value; the signing key must already exist. Static S tokens retain the ordinary update path. Dynamic D tokens support the original Lists element-edit route only, using operation=preview/apply/status and request_id. The original route checks the current actor access; unknown attempts cannot be replayed automatically. T/F tokens, custom routes and ;image suffixes are refused. URL creation/refresh uses its separate resource profile. For optional nonsearchable USER resources, the same update tool accepts operation=preview/apply/status and request_id (32 lowercase hex). Preview returns preview_fingerprint; apply/status require that exact fingerprint and the original value/expected_revision. Existing confirm=true remains required; preview/status never call CUser. Ordered MULTIPLE static previews use original signed tokens; MULTIPLE file content uploads use ordered upload objects. Original UI pending capabilities require the actual matching genuine native upload session. The default physical GET/form carrier is preserved; explicit pending_context=mcp_json adapts the exact received JSON capability to native input only after native signature/actor/context proof. Unknown outcomes block automatic retries. Ordinary scalar calls keep their existing arguments and behavior. Genuine FILE pending attachment may explicitly request pending_persistence=explicit_native_save to call original UploadSession::save after CUser returned and retain a separate persistence-owner receipt. Omission preserves ordinary deferred request-termination behavior. Genuine native pending capabilities with the current native token salt are still required; this does not require a browser when a source-qualified native SDK producer is used. Ordered MULTIPLE FILE content uploads also admit a canonical absent USER UTS row: preview remains read-only, and the original CUser/manager owner creates the first UTS row plus selected ordered UTM rows. This finite profile requires no existing UTM rows, nullable null-default foreign UTS columns, ordinary default FILE settings, safe ASCII .txt names, text/plain, 1..8 uploads and four MiB total. Empty upload lists, absent clears and pending-ID/session input are excluded; existing rows retain their prior profile. Optional file_write_profile=append_pending appends genuine pending uploader capabilities to an existing nonempty ordered MULTIPLE FILE relation. Existing IDs come only from the fresh bound field state; their order and repeats remain, and at least one new capability is required. The combined relation is at most 64 items, optional/nonsearchable with default settings. No caller retained IDs or native retain arrays are accepted. Existing files, bytes and shared references are preserved; no file resource/download rights are granted. The profile is included in preview/apply/status identity. Omission retains replacement behavior; fresh_virtual_upload does not accept this append profile. SINGLE URL previews accept an existing original signed D token only through this journal protocol, for the original Lists default element-edit route with a literal registered prefix. The original Router and Lists read-access handler decide access under the current actor; the selected route, source, cache, resource and revision remain bound. T/F tokens and other dynamic routes are refused. Resource operations also accept {url:absolute_http_url} for SINGLE URL_PREVIEW and an ordered list for MULTIPLE. Apply invokes the original URL facade (including native cache/create/expired refresh, default HTTP/parsers and native image/temp owners) before one original CUser relation update. Native default operational source profiles are checked without replacing services/options/events. Preview performs native read-only URL planning. Pending native request cleanup produces UNKNOWN with no retry; status never repeats owners. Old-image deletion must match fixed original/resize paths and native quota effects before the USER relation changes. Local Router/D access and MD5-based remote foreign deduplication remain unqualified before those owners. Mixed image/path effects that cannot be verified produce UNKNOWN without retry. Optional pending_context=mcp_json explicitly maps the exact received single JSON tools/call pending capability to the admitted native field input through public HttpRequest::addFilter. It keeps the actual Request/auth/session/CSRF/cookies and requires an already initialized genuine native session with a valid matching token salt. It neither initializes a session nor performs a UI HTTP upload. Ordinary physical native GET/form carrier remains the default. Preview can normalize input but never calls CUser; an uncertain normalization blocks the relation owner and requires manual recovery. Optional pending_context=fresh_virtual_upload composes new ASCII .txt text/plain content and numeric native USER FILE attachment in the same actual authenticated JSON request. The SINGLE profile requires an existing optional nonsearchable SINGLE FILE with empty value or one existing local file in the complete SQL/physical preservation graph. Replacing that SINGLE relation preserves the previous file, its bytes and duplicate/version graph; no deletion input is accepted. The ordered MULTIPLE profile requires an existing UTS row, a canonical selected relation (NULL, empty list or up to64 stored IDs with matching UTM rows), optional nonsearchable FILE and default settings; it accepts 1..8 nonempty ASCII .txt text/plain uploads with 96000 bytes total. Every previous selected local file must have the same complete SQL/physical witness and remains preserved when the ordered relation is replaced. Absent UTS rows, mixed existing/pending IDs and mandatory/custom settings are unsupported for fresh composition. Preview issues native_field_input.session_reference; apply and status must echo that exact server reference and preview_fingerprint with the same request_id, revision and original value (one upload object or an ordered upload list). Apply may initialize the genuine native request session fixed ID using public bitrix_sessid only when absent, normalize the exact received reference via public Request filter, upload through original Uploader, register and save its selected cached UploadSession, then call original CUser. These are separately journaled owners. No native UI HTTP/CSRF-filter acceptance or cross-request virtual-session persistence is claimed. UNKNOWN blocks replay and never cleans up resources automatically.

user_id
целое число · обязательный параметр

Номер пользователя сайта.

field_id
целое число · обязательный параметр

Номер дополнительного поля пользователя. Выберите его из списка полей.

value
строка / целое число / логическое значение / null / массив / объект · обязательный параметр

Новое значение одиночного поля или список значений множественного поля. Примеры: ["Красный","Синий"], [0,-2,10], [true,false], [12,15].

expected_revision
строка · обязательный параметр
confirm
логическое значение · обязательный параметр
datetime_write_profile
строка

Opt in on GET and UPDATE to the finite SINGLE or MULTIPLE optional or mandatory USE_TIMEZONE=Y writer with IS_SEARCHABLE exactly N or Y. The original selected-name shouldReindex predicate must return false in the qualified native context; intranet/HR index writers remain unsupported: SINGLE also admits first-row initialization by a nonempty timestamp under the same qualified NULL-default full-row shape and empty whole-user UTM set, with a fixed original-session UTS InnoDB/DDL/no-trigger/direct-visibility/no-secondary-UNIQUE witness bound in the revision and final pre-owner snapshot and repeated byte-exact after the owner; no UTM write is reached. Initialized SINGLE behavior is unchanged. MULTIPLE admits first-row initialization by a nonempty list when all physical non-key columns are nullable with NULL default, the whole-user UTM set is empty, and fixed original-session UTS/UTM engine/DDL/trigger/foreign-key/unique-index safety images qualify. Existing MULTIPLE lists remain supported under those same physical proofs. First-row writes and existing initialized UTS values admit native prepared NONE, NOW/empty and canonical FIXED defaults (1000-9999), without applying them; explicit nonempty first-row values are never replaced by defaults. No unselected timezone or resource metadata; original actor, culture, site and main-option caches must qualify. Original current-actor dispatch owns actor timezone, automatic TZ cookie, effective default, invalid-zone zero fallback, fixed-offset zones and disabled identity; the automatic-option scalar may initialize naturally before the baseline. GET supplies the complete write revision. SINGLE input is actor wall time YYYY-MM-DDTHH:mm:ss; null clears an optional field only; the UTS row must already exist, so null cannot create the first row. MULTIPLE input is an ordered list of up to 1024 such nonempty strings, with an initialized selected list or the explicit first-row case, and at most 1024 total resulting UTM rows. [] clears an optional existing-row field only; first-row input must be nonempty; mandatory lists require at least one nonempty timestamp. Order and duplicates remain. Null is not a list. Changed lists generate new selected UTM IDs. Both native UTS and legacy UTM conversions are projected through original owners; no offset arithmetic is substituted. Output remains stored server time plus separate native display. Raw physical images enter the full revision and repeat before the original owner; only the generated nondecreasing UTM AUTO_INCREMENT table option may differ after a changed write, while column attributes and every other DDL/state byte stay bound.

hl_reference_write_profile
строка

Use on GET and UPDATE for the complete raw USER UTS/UTM write revision. Genuine admin editing an existing user, including USER1 or self under the native self-update effect checks; optional searchable or nonsearchable SINGLE HL reference, existing UTS, positive currently accessible target. UPDATE accepts value=null only. Clears relation through original CUser; no target deletion or assignment. single_attach_repoint on both GET and UPDATE instead admits a positive existing target ID for an optional or mandatory searchable or nonsearchable SINGLE field after separate native target ACL/membership checks; mandatory fields cannot be cleared. A full-row write revision is required. IS_SEARCHABLE accepts exactly N or Y. Before original USER update, the source-qualified selected-name native shouldReindex predicate must return false; intranet/HR indexing contexts remain unsupported. SINGLE attach may create the first UTS row only when all existing non-key columns are nullable with NULL defaults and the whole-user UTM set is empty, and original-session metadata proves a base InnoDB table without triggers under direct effective TRIGGER visibility; no target creation. First-row storage additionally requires direct effective SELECT index visibility and no secondary UNIQUE indexes, so native MySQL duplicate-key merge can select only the intended VALUE_ID. Ordinary stored-read revisions are ineligible. multiple_replace instead admits an initialized optional or mandatory searchable or nonsearchable MULTIPLE HL integer list in an existing UTS row: ordered positive integer IDs, up to1024 and at most1024 resulting whole-user UTM rows; mandatory fields require at least one ID, and [] clears optional fields only. Every distinct target requires current native ACL/membership. Order and repeats survive original CUser; internal UTM IDs are not returned or claimed owned. Every explicit multiple_replace revision additionally requires original-session base-InnoDB/no-trigger/direct-TRIGGER visibility and exact DDL for both fixed b_uts_user and b_utm_user; these witnesses are repeated before the original owner and retained in the complete postimage. Only the generated b_utm_user table-option AUTO_INCREMENT counter may advance in a changed-write postimage; GET revision and final pre-owner raw DDL stay exact, while column AUTO_INCREMENT and every other DDL byte remain bound. Direct global SELECT metadata visibility, no incoming UTM DELETE cascades and no incoming selected-column UTS UPDATE cascades are also required for both first and initialized rows; unknown visibility refuses. Secondary UNIQUE indexes on b_uts_user are refused because native MySQL merge can otherwise update another user on a non-primary conflict. MULTIPLE additionally supports first-row initialization with a nonempty positive list only when the whole-user UTM set is empty, every existing non-key UTS column is nullable with NULL default, and the same original-session base-InnoDB/no-trigger/direct-TRIGGER visibility for both fixed b_uts_user and b_utm_user insert tables evidence is qualified before planning and immediately before the original owner. Empty first-row input is refused. Existing-row NULL lists and mixed resource fallback remain unsupported. USER1 and the current administrator use the same selected profiles; self updates additionally verify original actor timestamp, authentication, session NAME and native current-user cache effects.

operation
строка
pending_persistence
строка
file_write_profile
строка
request_id
строка
preview_fingerprint
строка
pending_context
строка
native_field_input
объект
Схема параметров JSON
{
  "type": "object",
  "properties": {
    "user_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647,
      "description": "Номер пользователя сайта."
    },
    "field_id": {
      "type": "integer",
      "minimum": 1,
      "maximum": 2147483647,
      "description": "Номер дополнительного поля пользователя. Выберите его из списка полей."
    },
    "value": {
      "type": [
        "string",
        "integer",
        "boolean",
        "null",
        "array",
        "object"
      ],
      "maxItems": 1024,
      "items": {
        "type": [
          "string",
          "integer",
          "boolean",
          "object"
        ],
        "properties": {
          "upload": {
            "type": "object",
            "properties": {
              "name": {
                "type": "string",
                "minLength": 1,
                "maxLength": 128
              },
              "content_base64": {
                "type": "string",
                "maxLength": 5592408
              },
              "content_type": {
                "type": "string",
                "minLength": 3,
                "maxLength": 128
              }
            },
            "required": [
              "name",
              "content_base64",
              "content_type"
            ],
            "additionalProperties": false
          },
          "uploader": {
            "type": "object",
            "properties": {
              "file_id": {
                "type": "integer",
                "minimum": 1,
                "maximum": 2147483647
              },
              "session_id": {
                "type": "string",
                "maxLength": 36
              },
              "pending_token": {
                "type": "string",
                "maxLength": 101
              }
            },
            "required": [
              "file_id",
              "session_id",
              "pending_token"
            ],
            "additionalProperties": false
          },
          "url": {
            "type": "string",
            "minLength": 1,
            "maxLength": 2000
          }
        },
        "additionalProperties": false
      },
      "description": "Новое значение одиночного поля или список значений множественного поля. Примеры: [\"Красный\",\"Синий\"], [0,-2,10], [true,false], [12,15].",
      "properties": {
        "upload": {
          "type": "object",
          "properties": {
            "name": {
              "type": "string",
              "minLength": 1,
              "maxLength": 128
            },
            "content_base64": {
              "type": "string",
              "maxLength": 5592408
            },
            "content_type": {
              "type": "string",
              "minLength": 3,
              "maxLength": 128
            }
          },
          "required": [
            "name",
            "content_base64",
            "content_type"
          ],
          "additionalProperties": false
        },
        "uploader": {
          "type": "object",
          "properties": {
            "file_id": {
              "type": "integer",
              "minimum": 1,
              "maximum": 2147483647
            },
            "session_id": {
              "type": "string",
              "maxLength": 36
            },
            "pending_token": {
              "type": "string",
              "maxLength": 101
            }
          },
          "required": [
            "file_id",
            "session_id",
            "pending_token"
          ],
          "additionalProperties": false
        },
        "url": {
          "type": "string",
          "minLength": 1,
          "maxLength": 2000
        }
      },
      "additionalProperties": false
    },
    "expected_revision": {
      "type": "string",
      "minLength": 64,
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "confirm": {
      "type": "boolean",
      "enum": [
        true
      ]
    },
    "datetime_write_profile": {
      "type": "string",
      "enum": [
        "actor_wall_time"
      ],
      "description": "Opt in on GET and UPDATE to the finite SINGLE or MULTIPLE optional or mandatory USE_TIMEZONE=Y writer with IS_SEARCHABLE exactly N or Y. The original selected-name shouldReindex predicate must return false in the qualified native context; intranet/HR index writers remain unsupported: SINGLE also admits first-row initialization by a nonempty timestamp under the same qualified NULL-default full-row shape and empty whole-user UTM set, with a fixed original-session UTS InnoDB/DDL/no-trigger/direct-visibility/no-secondary-UNIQUE witness bound in the revision and final pre-owner snapshot and repeated byte-exact after the owner; no UTM write is reached. Initialized SINGLE behavior is unchanged. MULTIPLE admits first-row initialization by a nonempty list when all physical non-key columns are nullable with NULL default, the whole-user UTM set is empty, and fixed original-session UTS/UTM engine/DDL/trigger/foreign-key/unique-index safety images qualify. Existing MULTIPLE lists remain supported under those same physical proofs. First-row writes and existing initialized UTS values admit native prepared NONE, NOW/empty and canonical FIXED defaults (1000-9999), without applying them; explicit nonempty first-row values are never replaced by defaults. No unselected timezone or resource metadata; original actor, culture, site and main-option caches must qualify. Original current-actor dispatch owns actor timezone, automatic TZ cookie, effective default, invalid-zone zero fallback, fixed-offset zones and disabled identity; the automatic-option scalar may initialize naturally before the baseline. GET supplies the complete write revision. SINGLE input is actor wall time YYYY-MM-DDTHH:mm:ss; null clears an optional field only; the UTS row must already exist, so null cannot create the first row. MULTIPLE input is an ordered list of up to 1024 such nonempty strings, with an initialized selected list or the explicit first-row case, and at most 1024 total resulting UTM rows. [] clears an optional existing-row field only; first-row input must be nonempty; mandatory lists require at least one nonempty timestamp. Order and duplicates remain. Null is not a list. Changed lists generate new selected UTM IDs. Both native UTS and legacy UTM conversions are projected through original owners; no offset arithmetic is substituted. Output remains stored server time plus separate native display. Raw physical images enter the full revision and repeat before the original owner; only the generated nondecreasing UTM AUTO_INCREMENT table option may differ after a changed write, while column attributes and every other DDL/state byte stay bound."
    },
    "hl_reference_write_profile": {
      "type": "string",
      "enum": [
        "single_clear",
        "single_attach_repoint",
        "multiple_replace"
      ],
      "description": "Use on GET and UPDATE for the complete raw USER UTS/UTM write revision. Genuine admin editing an existing user, including USER1 or self under the native self-update effect checks; optional searchable or nonsearchable SINGLE HL reference, existing UTS, positive currently accessible target. UPDATE accepts value=null only. Clears relation through original CUser; no target deletion or assignment. single_attach_repoint on both GET and UPDATE instead admits a positive existing target ID for an optional or mandatory searchable or nonsearchable SINGLE field after separate native target ACL/membership checks; mandatory fields cannot be cleared. A full-row write revision is required. IS_SEARCHABLE accepts exactly N or Y. Before original USER update, the source-qualified selected-name native shouldReindex predicate must return false; intranet/HR indexing contexts remain unsupported. SINGLE attach may create the first UTS row only when all existing non-key columns are nullable with NULL defaults and the whole-user UTM set is empty, and original-session metadata proves a base InnoDB table without triggers under direct effective TRIGGER visibility; no target creation. First-row storage additionally requires direct effective SELECT index visibility and no secondary UNIQUE indexes, so native MySQL duplicate-key merge can select only the intended VALUE_ID. Ordinary stored-read revisions are ineligible. multiple_replace instead admits an initialized optional or mandatory searchable or nonsearchable MULTIPLE HL integer list in an existing UTS row: ordered positive integer IDs, up to1024 and at most1024 resulting whole-user UTM rows; mandatory fields require at least one ID, and [] clears optional fields only. Every distinct target requires current native ACL/membership. Order and repeats survive original CUser; internal UTM IDs are not returned or claimed owned. Every explicit multiple_replace revision additionally requires original-session base-InnoDB/no-trigger/direct-TRIGGER visibility and exact DDL for both fixed b_uts_user and b_utm_user; these witnesses are repeated before the original owner and retained in the complete postimage. Only the generated b_utm_user table-option AUTO_INCREMENT counter may advance in a changed-write postimage; GET revision and final pre-owner raw DDL stay exact, while column AUTO_INCREMENT and every other DDL byte remain bound. Direct global SELECT metadata visibility, no incoming UTM DELETE cascades and no incoming selected-column UTS UPDATE cascades are also required for both first and initialized rows; unknown visibility refuses. Secondary UNIQUE indexes on b_uts_user are refused because native MySQL merge can otherwise update another user on a non-primary conflict. MULTIPLE additionally supports first-row initialization with a nonempty positive list only when the whole-user UTM set is empty, every existing non-key UTS column is nullable with NULL default, and the same original-session base-InnoDB/no-trigger/direct-TRIGGER visibility for both fixed b_uts_user and b_utm_user insert tables evidence is qualified before planning and immediately before the original owner. Empty first-row input is refused. Existing-row NULL lists and mixed resource fallback remain unsupported. USER1 and the current administrator use the same selected profiles; self updates additionally verify original actor timestamp, authentication, session NAME and native current-user cache effects."
    },
    "operation": {
      "type": "string",
      "enum": [
        "preview",
        "apply",
        "status"
      ]
    },
    "pending_persistence": {
      "type": "string",
      "enum": [
        "explicit_native_save"
      ]
    },
    "file_write_profile": {
      "type": "string",
      "enum": [
        "append_pending"
      ]
    },
    "request_id": {
      "type": "string",
      "minLength": 32,
      "maxLength": 32,
      "pattern": "^[a-f0-9]{32}$"
    },
    "preview_fingerprint": {
      "type": "string",
      "minLength": 64,
      "maxLength": 64,
      "pattern": "^[a-f0-9]{64}$"
    },
    "pending_context": {
      "type": "string",
      "enum": [
        "mcp_json",
        "fresh_virtual_upload"
      ]
    },
    "native_field_input": {
      "type": "object",
      "properties": {
        "session_reference": {
          "type": "string",
          "minLength": 36,
          "maxLength": 36,
          "pattern": "^[a-f0-9-]{36}$"
        }
      },
      "required": [
        "session_reference"
      ],
      "additionalProperties": false
    }
  },
  "required": [
    "user_id",
    "field_id",
    "value",
    "expected_revision",
    "confirm"
  ],
  "additionalProperties": false
}