For AI agents: the complete documentation index is available at https://types-mediawiki-response.pages.dev/zh/llms.txt, the full documentation bundle is available at https://types-mediawiki-response.pages.dev/zh/llms-full.txt, and this page is available as Markdown at https://types-mediawiki-response.pages.dev/zh/api/core/ApiUser.md.
  • 中文
  • Interface: ApiUser

    Defined in: core/query/users.ts:135

    A user record. usprop controls which fields appear.

    Extends

    Properties

    attachedlocal?

    optional attachedlocal?: Record<string, boolean>

    Defined in: core/query/users.ts:131

    Whether the account is attached to each provider, keyed like centralids. usprop=centralids / uiprop=centralids.

    Inherited from

    ApiUserCore.attachedlocal


    blockanononly?

    optional blockanononly?: boolean

    Defined in: core/query/users.ts:52

    Whether the block only affects anonymous users (soft block). A real boolean.

    Inherited from

    ApiUserCore.blockanononly


    blockautoblocking?

    optional blockautoblocking?: boolean

    Defined in: core/query/users.ts:83

    Whether the block also enables the autoblock feature. A real boolean.

    Since

    MediaWiki 1.46

    Inherited from

    ApiUserCore.blockautoblocking


    blockcomponents?

    optional blockcomponents?: ApiBlockInfo[]

    Defined in: core/query/users.ts:76

    The individual blocks composing this one; only for composite blocks.

    Since

    MediaWiki 1.42

    Inherited from

    ApiUserCore.blockcomponents


    blockedby?

    optional blockedby?: string

    Defined in: core/query/users.ts:20

    User name of the blocker; '' when unknown (e.g. autoblocks).

    Inherited from

    ApiUserCore.blockedby


    blockedbyid?

    optional blockedbyid?: number

    Defined in: core/query/users.ts:23

    User id of the blocker; 0 when unknown.

    Inherited from

    ApiUserCore.blockedbyid


    blockedtimestamp?

    optional blockedtimestamp?: string

    Defined in: core/query/users.ts:29

    When the block was placed or last modified.

    Inherited from

    ApiUserCore.blockedtimestamp


    blockedtimestampformatted?

    optional blockedtimestampformatted?: string

    Defined in: core/query/users.ts:34

    blockedtimestamp localized for the requesting user.

    Inherited from

    ApiUserCore.blockedtimestampformatted


    blockemail?

    optional blockemail?: boolean

    Defined in: core/query/users.ts:59

    Whether the block prevents sending email. A real boolean.

    Since

    MediaWiki 1.41

    Inherited from

    ApiUserCore.blockemail


    blockexpiry?

    optional blockexpiry?: string

    Defined in: core/query/users.ts:37

    Block expiry; the literal infinite when the block does not expire.

    Inherited from

    ApiUserCore.blockexpiry


    blockexpiryformatted?

    optional blockexpiryformatted?: string

    Defined in: core/query/users.ts:40

    blockexpiry localized for the requesting user; only when the block expires.

    Inherited from

    ApiUserCore.blockexpiryformatted


    blockexpiryrelative?

    optional blockexpiryrelative?: string

    Defined in: core/query/users.ts:43

    Human-readable time to expiry (e.g. in 5 days); only when the block expires.

    Inherited from

    ApiUserCore.blockexpiryrelative


    blockhidden?

    optional blockhidden?: true

    Defined in: core/query/users.ts:91

    The block itself is suppressed (hidden from users without the hideuser right). A Flag, present only when suppressed.

    Since

    MediaWiki 1.47

    Inherited from

    ApiUserCore.blockhidden


    blockid?

    optional blockid?: number

    Defined in: core/query/users.ts:17

    ID of the block.

    Inherited from

    ApiUserCore.blockid


    blocknocreate?

    optional blocknocreate?: boolean

    Defined in: core/query/users.ts:49

    Whether the block prevents account creation. A real boolean.

    Inherited from

    ApiUserCore.blocknocreate


    blockowntalk?

    optional blockowntalk?: boolean

    Defined in: core/query/users.ts:66

    Whether editing one's own talk page is prevented. A real boolean.

    Since

    MediaWiki 1.41

    Inherited from

    ApiUserCore.blockowntalk


    blockpartial?

    optional blockpartial?: boolean

    Defined in: core/query/users.ts:46

    Whether the block only applies to certain pages, namespaces and/or actions. A real boolean.

    Inherited from

    ApiUserCore.blockpartial


    blockreason?

    optional blockreason?: string

    Defined in: core/query/users.ts:26

    Block reason, in plain text.

    Inherited from

    ApiUserCore.blockreason


    cancreate?

    optional cancreate?: boolean

    Defined in: core/query/users.ts:171

    Whether an account could be created for this name. usprop=cancreate; a real boolean, present only on missing entries queried by name.


    cancreateerror?

    optional cancreateerror?: ApiMessage[] | ApiSpecMessage[]

    Defined in: core/query/users.ts:177

    Why cancreate is false (e.g. a reserved username), shaped per the request's errorformat. Emitted only when the creation check failed.


    centralids?

    optional centralids?: Record<string, number>

    Defined in: core/query/users.ts:128

    Global (CentralAuth) ids keyed by provider. usprop=centralids / uiprop=centralids.

    Inherited from

    ApiUserCore.centralids


    editcount?

    optional editcount?: number

    Defined in: core/query/users.ts:113

    Total edit count. usprop=editcount / uiprop=editcount.

    Inherited from

    ApiUserCore.editcount


    emailable?

    optional emailable?: boolean

    Defined in: core/query/users.ts:165

    Whether the user can be emailed. usprop=emailable; a real boolean (false when the address is hidden or unconfirmed), not a Flag.


    gender?

    optional gender?: string & object | "unknown" | "male" | "female"

    Defined in: core/query/users.ts:159

    User gender. usprop=gender. Open union for forward compatibility.


    groupmemberships?

    optional groupmemberships?: ApiUserGroupMembership[]

    Defined in: core/query/users.ts:119

    Group memberships with grant/expiry metadata. usprop=groupmemberships / uiprop=groupmemberships.

    Inherited from

    ApiUserCore.groupmemberships


    groups?

    optional groups?: string[]

    Defined in: core/query/users.ts:116

    Groups the user belongs to (including implicit). usprop=groups / uiprop=groups.

    Inherited from

    ApiUserCore.groups


    hidden?

    optional hidden?: true

    Defined in: core/query/users.ts:183

    The user is hidden (suppressed via a hidden block); a Flag. Emitted regardless of usprop.


    implicitgroups?

    optional implicitgroups?: string[]

    Defined in: core/query/users.ts:122

    Groups that apply by virtue of an inherent right, not membership. usprop=implicitgroups / uiprop=implicitgroups.

    Inherited from

    ApiUserCore.implicitgroups


    missing?

    optional missing?: true

    Defined in: core/query/users.ts:150

    true when no such user exists (missing is a Flag).


    name?

    optional name?: string

    Defined in: core/query/users.ts:140

    User name (normalized). Present on found entries and on missing entries queried by name; absent from missing entries queried by ususerids.


    registration?

    optional registration?: string | null

    Defined in: core/query/users.ts:156

    Registration timestamp. null for accounts created before registration timestamps were tracked. usprop=registration.


    rights?

    optional rights?: string[]

    Defined in: core/query/users.ts:125

    Effective rights. usprop=rights / uiprop=rights.

    Inherited from

    ApiUserCore.rights


    systemblocktype?

    optional systemblocktype?: string

    Defined in: core/query/users.ts:69

    Type of the automatically applied system block; only for system blocks.

    Inherited from

    ApiUserCore.systemblocktype


    systemuser?

    optional systemuser?: true

    Defined in: core/query/users.ts:191

    true when this is a system user (e.g. MediaWiki default), absent otherwise; not gated by any usprop. A Flag.

    Since

    MediaWiki 1.43


    tempexpired?

    optional tempexpired?: boolean | null

    Defined in: core/query/users.ts:200

    Whether a temporary account has expired. usprop=tempexpired (auprop=tempexpired for list=allusers); a real boolean for a temporary account, and null for any other user.

    Since

    MediaWiki 1.46


    userid?

    optional userid?: number

    Defined in: core/query/users.ts:147

    User id. Present on found entries, and on missing entries queried by ususerids (echoing the requested id); absent from name-queried missing entries.