Lime Web Components API Documentation - v6.24.0
    Preparing search index...

    Interface User

    Represents a user in the Lime CRM system.

    The User object contains all relevant information about an authenticated user, including their identity, contact details, group memberships, and associated business object (coworker) if applicable. This information is used throughout the platform for authentication, authorization, and personalization.

    // Access user information in a component
    const appRepo = platform.get(PlatformServiceName.Application);
    const user = appRepo.getCurrentUser();

    console.log(`Logged in as: ${user.fullname} (${user.username})`);
    console.log(`Email: ${user.email}`);
    console.log(`Member of ${user.groups.length} groups`);

    // Check for specific group membership
    const isAdmin = user.groups.some(g => g.name === 'Administrators');
    const isSales = user.groups.some(g => g.name === 'Sales');
    // Load the user's coworker record for additional details
    if (user.coworker) {
    const repo = platform.get(PlatformServiceName.LimeObjectRepository);
    const coworkerObject = await repo.loadObject(
    user.coworker.limetype,
    user.coworker.id
    );
    // Access additional coworker properties like phone, department, etc.
    }
    interface User {
        active: boolean;
        coworker: UserCoworker;
        defaultGroup: UserGroup;
        email: string;
        fullname: string;
        groups: UserGroup[];
        id: number;
        username: string;
    }
    Index

    Properties

    active: boolean

    Indicates whether the user account is currently active.

    Inactive users cannot log in to the system. Useful for temporarily disabling accounts without deletion.

    coworker: UserCoworker

    Reference to the user's associated coworker business object.

    Many Lime CRM systems have a coworker limetype that stores additional employee information beyond the user account (phone, department, manager, etc.). This property links to that record if it exists.

    defaultGroup: UserGroup

    The user's primary group assignment.

    When a user belongs to multiple groups, this indicates their main group affiliation. Used for default permissions and organizational structure.

    email: string

    The user's email address.

    fullname: string

    The user's full display name.

    This is the human-readable name shown in the UI, typically in the format "First Last" (e.g., "John Doe"). Used for display purposes throughout the application.

    groups: UserGroup[]

    List of security groups the user belongs to.

    Groups control access permissions and feature availability. A user can belong to multiple groups, inheriting permissions from all of them.

    id: number

    The unique numeric identifier for the user.

    username: string

    The unique username used for authentication.

    This is the login identifier for the user, typically in a format like "john.doe" or "jdoe". It must be unique across the system.