Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Get creator name of user macro

Philippe Braxmeier March 20, 2018

Hello community,

I try to write a Page Approved User Macro.
The variable $username should show who added the Macro.

 

#set ($username="$req.getRemoteUser()" )
<th class="confluenceTh"><p>Approved:</p></th><td class="confluenceTd"><p>$username</p></td>

 

But this shows always the loggend in user. I thought with #set its possible to save the current user and display it later with $username.

 

can you help me?

 

 

1 answer

0 votes
Nic Brough -Adaptavist-
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.
March 20, 2018

$req is the incoming http call, not the page object, that's why it renders the current user.

You should be looking at $content

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events