This object contains all the data related to a user within formcycle. To access the user currently signed in, use XFC_METADATA.user. In case the user is not signed in, the user data refers to an anonymous user. For example, the universalReferenceId is set to ANONYMOUS.

Hierarchy

  • MetadataUser

Index

Properties

Optional authTypeId

authTypeId: string | null

The name of the login method that was used.

Unset when the user does not have a profile, null when the login method is unknown (e.g. an anonymous user).

displayName

displayName: string | null

The preferred display name of this user.

null when the user does not have a display name (e.g. an anonymous user).

familyName

familyName: string | null

The last or family name of this user.

null when the user does not have a family name (e.g. an anonymous user).

firstName

firstName: string | null

The first or given name of this user.

null when the user does not have a first name (e.g. an anonymous user).

gender

gender: "FEMALE" | "MALE" | "DIVERSE" | "UNSPECIFIED" | null

The gender of this user.

null when the user does not have a gender. An anonymous user has this property set to UNSPECIFIED.

groups

groups: string[]

A list of user groups to which this user belongs. May be empty when the user does not belong to any groups.

hasProfile

hasProfile: boolean

Whether the user has a profile. The profile is used to store user-specific settings and data.

Optional id

id: string

A unique ID of this user, depends on the login method.

Unset when the user does not have a profile.

Optional linkedId

linkedId: string | null

Identifier of another user profile linked to this user. It usually belongs to the same physical user.

Unset when the user does not have a profile, null when they do not have a linked profile (e.g. an anonymous user).

Optional locale

locale: string | null

The locale or preferred language of the user, such as en or de.

Unset when the user does not have a profile, null when they do not have a preferred locale (e.g. an anonymous user).

Optional location

location: string | null

The location of the user.

Unset when the user does not have a profile, null when they do not have a location set (e.g. an anonymous user).

mail

mail: string | null

Optional email address of this user.

null when the user does not have an email address, e.g. an anonymous user.

Optional phone

phone: string | null

The (optional) phone number of this user.

deprecated

Scheduled to be removed. Will almost always be null.

Optional pictureUrl

pictureUrl: string | null

A URL to a picture of the user.

Unset when the user does not have a profile, null when they do not have a picture set (e.g. an anonymous user).

Optional profileUrl

profileUrl: string | null

A URL to the user's profile.

Unset when the user does not have a profile, null when no profile URL is available (e.g. an anonymous user).

Optional rawData

rawData: Record<string, JSON>

All attributes of the user that were returned by the login method. The contents of this JSON object depend on the login method.

You should inspect the value of authTypeId first and check whether it matches the expected login method before accessing these attributes.

Unset when the user does not have a profile.

roles

roles: string[]

The formcycle roles to which this user was assigned. May be empty when the user does not belong to any role.

title

title: "KEINE_ANGABE" | "HERR" | "FRAU" | "DIVERS" | null

The form of address of this user.

null when the user does not have a title. An anonymous user has this property set to KEINE_ANGABE.

deprecated

Use gender.

Optional typedId

typedId: string

A user identifier with a prefix which is the profile type (full Java class name with package).

This identifier is unique throughout all login methods.

Unset when the user does not have a profile.

universalReferenceId

universalReferenceId: string

The universal reference ID of this user. This ID is unique throughout all login methods and is used to identify the same user across different login methods.

An anonymous user has this property set to ANONYMOUS.

userName

userName: string | null

The username of this user.

null when the user does not have a user name (e.g. an anonymous user).