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

> Macro (table-plus)
> 
> |  |  |  |  |
> | --- | --- | --- | --- |
> | **Syntax** | hasUserProperty(userNameOrKey, property) | **Package** |  |
> | **Alias** |  | **Pkg Usage** |  |

## Description

> Macro (excerpt)
> 
> Checks if the user has the given property set.

Checks if the user has the given property set.

## Parameters

> Macro (table-plus)
> 
> | Parameter name | Type | Required | Description |
> | --- | --- | --- | --- |
> | userNameOrKey | String | Yes | User name or key of a user to check the property for. |
> | property | String | Yes | Key of the property to check. |

## Return Type

**Boolean (true/false)**

Returns true if the user has the given property set and false otherwise.

## Example

```javascript
if (hasUserProperty("jdoe", "phone")) {
    return getUserProperty("jdoe", "phone");
}
```

## See also

> Macro (contentbylabel)