Get Current User via User Macro

Is there a way (similar to $body) for me to display the currently logged in user? Or at least somehow obtain the user's full name?

3 answers

1 accepted

8 votes
Answer accepted

To get the full name, you can use: $action.remoteUser.fullName

I'm not sure what you mean by "display the currently logged in user" but if you can elaborate, we might be able to help out there too.

[edit] You may find this to be a helpful reference: https://developer.atlassian.com/display/CONFDEV/Confluence+Objects+Accessible+From+Velocity

{run-now} $current_user_name{run-now}

i use

#set( $username = "$req.getRemoteUser()" )

cheers

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted 7 hours ago in United States

Atlassian acquires AgileCraft

         Good Day, Bad bad traffic, not sure why!!!! 1/2 hour commute took me 2 hours today 🤯 What helped me is that I kept browsing LinkedIn until...

31 views 1 0
View post

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you