formcycle 8.3.6 - JavaScript for forms
    Preparing search index...

    Interface MetadataUser

    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.

    interface MetadataUser {
        authTypeId?: string;
        displayName: string;
        familyName: string;
        firstName: string;
        gender: "FEMALE" | "MALE" | "DIVERSE" | "UNSPECIFIED";
        groups: string[];
        hasProfile: boolean;
        id?: string;
        linkedId?: string;
        locale?: string;
        location?: string;
        mail: string;
        phone?: string;
        pictureUrl?: string;
        profileUrl?: string;
        rawData?: Record<string, JSON>;
        roles: string[];
        title: "KEINE_ANGABE" | "HERR" | "FRAU" | "DIVERS";
        typedId?: string;
        universalReferenceId: string;
        userName: string;
    }
    Index

    Properties

    authTypeId?: string

    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: string

    The preferred display name of this user.

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

    familyName: string

    The last or family name of this user.

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

    firstName: string

    The first or given name of this user.

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

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

    The gender of this user.

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

    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: boolean

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

    id?: string

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

    Unset when the user does not have a profile.

    linkedId?: string

    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).

    locale?: string

    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).

    location?: string

    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: string

    Optional email address of this user.

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

    phone?: string

    The (optional) phone number of this user.

    Scheduled to be removed. Will almost always be null.

    pictureUrl?: string

    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).

    profileUrl?: string

    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).

    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: string[]

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

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

    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.

    Use gender.

    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: 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: string

    The username of this user.

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