Profile Macro - How do I make it display the logged in user

Is it possible to make the "Profile" macro function so that it displays profile info specific to the person logged in and using our Confluence intranet site?

What I'm trying to do is insert the user's profile information on the home page of our intranet so they are greeted with a more personalized experience, and also to call their attention to the profile information they have out there on our intranet site in case it needs to be updated.

In Confluence the "My-Picture" macro achieves what I'm looking to do, but only for the user's photo and not their full profile info. 

Also, is it possible to customize the fields generated by "Profile" macro?

1 answer

1 accepted

2 votes
Accepted answer
Davin Studer Community Champion Oct 28, 2015

You could create a user macro that will implement the profile macro and put in the current user as the profile macro property. It would be something like this below.

## @noparams
<ac:structured-macro ac:name="profile">
	<ac:parameter ac:name="user">
		<ri:user ri:userkey="${action.authenticatedUser.key}"/>

Great suggestion. Thanks! Do you have any idea as to how to customize the fields generated by the Profile macro? There doesn't seem to be any customization options available for that. I suppose it would require another user macro?

Hi Davin,

Where do you put these codes you write "

<ac:structured-macro ac:name="profile-picture">
<ac:parameter ac:name="User">
<ri:user ri:userkey="12345678912345678912345"/>
</ac:structured-macro>" ?

In a velocity(.vm) file or .proverties file?

Could you please provide an example, thanks.


Davin Studer Community Champion Jan 22, 2016

You put them in a user macro. You can create a user macro in Confluence Admin. Once you've created the user macro it will show up in the editor macro browser.

image2016-1-22 8:53:44.png

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted Feb 06, 2019 in Confluence

Try out the new editing experience

Hi team, I’m Avinoam, a product manager on Confluence Cloud, and today I’m really excited to let the Community know that all customers can now try out the new editing experience and see some of the ...

1,133 views 61 8
Join discussion

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