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

This widget could not be displayed.
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
Community showcase
Posted Monday in Confluence

Why start from scratch? Introducing four new templates for Confluence Cloud

Hi my Community friends!  For those who don't know me, I'm a product marketer on the Confluence Cloud team - nice to meet you! For those of you who do, you know that I've been all up in your Co...

368 views 2 5
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