---
title: "Getting the current user"
canonical: "https://support.appfire.com/space/JMWEC/466289921/Getting%20the%20current%20user"
format: markdown
---
> Macro (aura-html)

### Abstract

<span style="color: #333333">This code snippet</span><span style="color: #333333"> </span><span style="color: #333333">fetches th</span><span style="color: #333333">e user who triggered the current transition.</span>

### Logic

<span style="color: #333333">This snippet uses the</span><span style="color: #333333"> </span>[currentUser](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465373277)<span style="color: #333333"> </span><span style="color: #333333">built-in variable to fetch the user object representing the user who triggered the current transition.</span>

### Snippet 

```javascript
{{ currentUser }}
```

### Examples

The output of this code snippet is a user object representing the current user which you could use to:

- Set a User picker field to the current user. Eg: Assign the issue to current user in one of the Set Field Value post-functions, using the "Treat value as JSON" option
- Set a User picker field to the current user in:
  - one of the Transition issue post-functions on the transition screen, if any
  - <span style="color: #333333">in the Create issue post-function under Set fields of new issue section</span>
- <span style="color: #333333">Conditionally execute a post-function or Unlink issues -</span><span style="color: #333333"> </span><span style="color: #333333">Eg: </span><span style="color: #333333">Check that the current user is the Reporter of the issue</span>
- <span style="color: #333333">Notify the customer that the issue raised by them is being handled by the current user through the</span>
  - Comment in one of the Comment issue post-functions
  - Subject/HTML body/Text body of Email issue post-function
- <span style="color: #333333">Write a JQL search expression in the Link issues to current issue post-function - Eg: Link issues assigned to the current user</span>

### References

- [currentUser variable](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465373277)
- [Accessing the fields of an issue](https://appfire.atlassian.net/wiki/spaces/JMWEC/pages/465373107)

### Related articles

> Macro (contentbylabel)

> Macro (details)
> 
> | **Related issues** |  |
> | --- | --- |