---
title: "getUser"
canonical: "https://support.appfire.com/space/PSJC/434507251/getUser"
format: markdown
---
> Macro (aura-html)


## Description

> Macro (excerpt)
> 
> Gets the user by account id.

Gets the user by account id.

|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getUser(accountId, [forceIncludeEmail]) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| accountId | String | Yes | The account id of the user that needs to be retrieved. |
| forceIncludeEmail | boolean | No | Optional boolean flag which, if true, is used to force the extraction of the user's email in the result. |

## Return Type

**[JUser](https://appfire.atlassian.net/wiki/spaces/PSJC/pages/435028065)**

Returns the user.

## Example

```javascript
JUser usr = getUser("john.doe");
```

## See also

> Macro (contentbylabel)