Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

Get Current User via User Macro

Phillip Ponzer [Cprime]
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 17, 2011

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

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

9 votes
Answer accepted
Aseem Parikh November 17, 2011

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

1 vote
Amir Shahheydari June 18, 2013

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

0 votes
Thomas Kalsberger, MSc February 18, 2014

i use

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

cheers

TAGS
AUG Leaders

Atlassian Community Events