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


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

## Description

> Macro (excerpt)
> 
> Returns the directory name the user belongs to.

Returns the directory name the user belongs to.

## Parameters

| Parameter name | Type | Required | Description |
| --- | --- | --- | --- |
| user | String | Yes | User name or key. |

## Return Type

**String**

Returns the directory name.

## Example

```
if(getUserDirectoryName(currentUser()) == "JIRA Internal Directory") {

	doSomethingRelatedToInternalDirectoryUsers();
}
```

## See also

> Macro (contentbylabel)