data. UserData

The data schema for a User document


new UserData(data, documentopt)

  • BaseUser
Name Type Attributes Default Description
_id string

The _id which uniquely identifies this User document.

avatar string | null <optional>

The user's avatar image.

character BaseActor <optional>

A linked Actor document that is this user's impersonated character.

color string

A color to represent this user.

hotbar object

A mapping of hotbar slot number to Macro id that represents this user's hotbar configuration.

name string

The user's name.

password string <optional>

The user's password. Available only on the Server side for security.

passwordSalt string <optional>

The user's password salt. Available only on the Server side for security.

permissions object

The user's individual permission configuration, see CONST.USER_PERMISSIONS.

role number

The user's role, see CONST.USER_ROLES.

flags object <optional>

An object of optional key/value flags.

Name Type Attributes Description
data object

Initial data used to construct the data object

document BaseUser <optional>

The document to which this data object belongs


  • DocumentData