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



|  |  |  |  |
| --- | --- | --- | --- |
| **Syntax** | getUser(user) | **Package** |  |
| **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Gets the user by username or key.

Gets the user by username or key.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| user | String | Yes | Username or key. Searches by the user key first and if there is no result by the user name as well. |

## Return Type

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

Returns the user.

## Example

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


> ⚠️ The look-up is first made after the userkey, then after the username.

## See also

> Macro (contentbylabel)