$fn.getCurrentUser()
Retrieves the user who is signed in. "asynchronous"
Arguments
None
Return value
Type | Description |
---|---|
User | Returns the user currently signed in |
Object | Property | Type | Description |
---|---|---|---|
User | userId | string | User ID (GUID) |
string | |||
name | string | Name | |
custom_01 | string | Custom Attribute 1 | |
custom_02 | string | Custom Attribute 2 | |
custom_03 | string | Custom Attribute 3 | |
custom_04 | string | Custom Attribute 4 | |
custom_05 | string | Custom Attribute 5 | |
custom_06 | string | Custom Attribute 6 | |
custom_07 | string | Custom Attribute 7 | |
custom_08 | string | Custom Attribute 8 | |
custom_09 | string | Custom Attribute 9 | |
custom_10 | string | Custom Attribute 10 | |
enabled | boolean | Enable/Disable | |
created | string | Creation date and time | |
updated | string | Update date and time | |
status | string | User Status |
Sample
try { const user = await $fn.getCurrentUser(); console.log(user);} catch (err) { console.log("Error", err);}