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
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}"/>
	</ac:parameter>
</ac:structured-macro>

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:parameter>
</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
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

587 views 20 11
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