$currentUser
Updated on Aug 21, 2025 2 minutes to readThe Current User Plugin provides a unified interface to access information about the currently authenticated user, including credentials, identity, roles, and permissions.
Methods
| Method | Description |
|---|---|
| getAvatarUrl | Returns the absolute URL of the user's avatar image. |
| getEmail | Returns the user email. |
| getId | Returns the user ID. |
| getIdentity | Returns the user identity information. |
| getIsAdmin | Returns whether the user has administrative rights. |
| getPresentation | Returns the user presentation name. |
| getUsername | Returns the username. |
| isInRole | Checks if the user has a specific role assignment. |
Methods Details
getAvatarUrl()
• Type
() => string
getEmail()
• Type
() => string | null
getId()
• Type
() => string | null
getIdentity()
• Type
() => string | null
getIsAdmin()
• Type
() => boolean
getIdentity()
• Type
() => string | null
getPresentation()
• Type
() => string | null
getUsername()
• Type
() => string | null
isInRole()
• Type
(role: E8ScriptAlias) => Promise<boolean>
• Details
Expects a role alias of type E8ScriptAlias.
Returns a Promise that resolves with a boolean indicating whether the current user has the specified role assignment.