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

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | getUser(userName) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

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

Gets the user by username or key.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | username | String | Yes | Username of selected user. |

## Return Type

**CUser**

Returns the user in a predefined structure type.

## Example

```javascript
CUser user = getUser("admin");
return user.email;
```

## See also

> Macro (contentbylabel)