githubEdit

User Identity

The UserIdentity module allows scenesarrow-up-right to access the profilearrow-up-right for the player's user.

const UserIdentity = require("~system/UserIdentity");

It contains the following methods and types:

Methods

The two methods in this module fetch bits of information from the player's user.

getUserData

Returns the UserData for the player's user.

interface Request {}

interface Response {
  // The profile information for the user, if available.
  data?: UserData;
}

function getUserData(Request): Promise<Response>;

Types

There's just one type in this module: UserData.

UserData

Holds (possibly partial) information about a user, their identity and avatar.

World Explorers can obtain this through the content systemarrow-up-right.

The profile entity definitionarrow-up-right details all of these fields and more. While the structure and keys of UserData are slightly different, the meaning of each field is the same.

Last updated