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

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

## Description

> Macro (excerpt)
> 
> Returns the user key for the provided user name.

Returns the user key for the provided user name.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | userName | String | Yes | User name of the user. |

## Return Type

**String**

## Example

```javascript
userNameToUserKey("jdoe");
```

## See also

> Macro (contentbylabel)