The user variable provides information about the current user.
The structure of user is as follows:
{
"isAuthenticated": true,
"roles": [
"OFFLINE_USER",
"PERSONAL_BOOK_USER",
"PRINT_USER",
"PERSONAL_BOOK_SHARE_USER",
"BETA_USER",
"COLLECTION_USER",
"ANALYTICS_USER",
"CONTENT_PUBLISHER",
"FEEDBACK_USER",
"RATING_USER",
"ADMIN",
"USERS_ADMIN",
"PDF_EXPORT_USER",
"KHUB_ADMIN",
"HTML_EXPORT_USER",
"SAVED_SEARCH_USER",
"PORTAL_ADMIN",
"DEBUG_USER"
],
"tags": [
"manager"
],
"customProperties": {
"exampleId": [
"exampleValue"
]
},
"profile": {
"id": "6d346375-8f99-4248-acf0-ec84ebeb60cc",
"displayName": "John Doe",
"emailAddress": "john.doe@example.com"
},
"orgs": {
"currentOrg": "b7f9c682-6e37-4d14-8cef-8a0a03a33b32",
"availableOrgs": [
"partners",
"employees"
]
}
}
| Field | Type | Description |
|---|---|---|
isAuthenticated |
Boolean | Indicates whether the user is authenticated or not. |
roles |
Array | Lists the roles the user has. |
tags |
Array | Lists the tags the user has. |
customProperties |
Object | Information about the user's SSO custom properties. |
${customPropertyId} |
Array | ${customPropertyId} is a placeholder for the SSO custom property ID, as defined in the Authentication menu. It contains the values of the custom property for the current user. |
profile |
Object | Information about the profile of the user. |
id |
String | The ID of the user, used in the Fluid Topics API (for example, in the Get a user's personal information and assets web service). |
displayName |
String | The display name of the user. |
emailAddress |
String | The email address of the user. |
orgs |
Object | Information about the user's orgs. |
currentOrg |
String | The org for which the user receives roles, groups, or tags. |
availableOrgs |
Array | The orgs to which the user belongs. |
If the user is not authenticated, the profile field is undefined, but roles may still be present.
For an example on how to use the user variable, see User bookmarks example.