--- title: "currentUser Object" slug: "currentuser-object" tags: ["data-integration"] updated: 2026-09-14T17:39:27Z published: 2026-09-14T17:39:27Z canonical: "docs.unqork.io/currentuser-object" --- > ## Documentation Index > Fetch the complete documentation index at: https://docs.unqork.io/llms.txt > Use this file to discover all available pages before exploring further. # currentUser Object When an end-user loads a module, Unqork makes information about that user available through a built-in object called `currentUser`. Creators use it to personalize content, autopopulate fields, filter data, and build role-based logic without writing custom authentication code. ## Available Properties | Property | Type | Description | | --- | --- | --- | | `currentUser.userId` | String | The ID of the logged-in user. | | `currentUser.name` | String | The user's display name. | | `currentUser.email` | String | The user's email address. | | `currentUser.role` | String | The user's primary Express role. | | `currentUser.expressRoles` | Array | All Express roles assigned to the user. | | `currentUser.groups` | Array | All Express groups the user belongs to. | | `currentUser.applicationRoles` | Object | Application-specific roles assigned to the user. | | `currentUser.locale` | String | The user's locale (for example, `en-US`). | | `currentUser.isDesignerUser` | Boolean | `true` if the user is a Creator. Not present for end-users. | | `currentUser.isAdmin` | Boolean | `true` if the user has administrator privileges. | | `currentUser.lastLogin` | String | The timestamp of the user's last login, in ISO 8601 format. | > [!WARNING] > `currentUser` is populated during server-side execution and is available in Initializer components, Plug-In components, and server-side workflow nodes. It is not available in client-side component logic. ## Where to Use It ### Initializer Component Use `currentUser` as the source in an Initializer component to autopopulate fields when a module loads. | Source | Target Property ID | Result | | --- | --- | --- | | `currentUser.name` | `requestorName` | Fills the field with the user's display name on load. | | `currentUser.email` | `requestorEmail` | Fills the field with the user's email address on load. | | `currentUser.userId` | `submittedBy` | Records who submitted the form. | ### Template Expressions Reference `currentUser` properties directly in template expressions to display user data in Content components or pass values to Plug-In components. ```plaintext Welcome, {{ currentUser.name }}. ``` ```plaintext {{ currentUser.email }} ``` See [Template Expressions](/unqorkai/docs/template-expressions) for syntax details. ### Plug-In Component (Filtering by User) Pass `currentUser.userId` as a filter when querying submissions to retrieve only the submissions belonging to the logged-in user. ```plaintext filter=userId={{ currentUser.userId }} ``` See [Querying Submissions](/unqorkai/docs/querying-submissions) for filter syntax. ### Role-Based Logic Use `currentUser.role` or `currentUser.expressRoles` in conditional logic to show or hide content based on the user's role. - `currentUser.role`: returns a single string with the user's primary role name. - `currentUser.expressRoles`: returns an array, useful when a user has multiple roles and you need to check for any of them. ## Anonymous Users If anonymous access is enabled in the environment and an unauthenticated user loads the module, `currentUser` properties will be empty or undefined. Design modules that rely on `currentUser` to require authentication, or handle the unauthenticated case explicitly. See [Environment Administration](/unqorkai/docs/environment-administration) for anonymous access settings. --- **Changelog** | Date | Change | | --- | --- | | — | Initial publication. | End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. An object is a type of data structure that represents a single, self-contained entity that acts as a container for the characteristics of that entity. Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. The Unqork front-end application framework that delivers Creator-built applications to end-users. Express is the layer end-users interact with—the published forms, screens, and navigation built in the Module Builder. Express is distinct from Express View, which is a Creator-facing preview tool in the IDE. In Unqork an application is a program used to perform specific tasks. An application can be one of two types: workflow or module. The Boolean data type accepts one of two values: true, or, false. Also known as Unqork Users, or Designer Users; is anyone who is inside the Unqork platform. End-users, also known as Express Users, are the individuals accessing an application through Express View. In most cases, end-users are the customers using the product. A standard format for representing dates and times. ISO 8601 format is represented in the following order: year, month, day, hour, minutes, seconds, and milliseconds. Includes the Short Answer component, Long Answer component, Select Boxes, Radio component, Dropdown, Number component and Single Checkbox. A Property ID is the unique field ID used by Unqork to track and link components in your module. A string is an object that represents a sequence of characters. Strings typically hold data represented in text form. An array is a type of object that stores one or more data types. Data types supported in arrays include numbers, strings, and objects.