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

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

Chris Hayes October 23, 2015

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
Answer accepted
Davin Studer
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.
October 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>
Chris Hayes October 28, 2015

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?

YJ Huang January 21, 2016

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
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.
January 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

Michelle Rau good
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.
July 9, 2020

This looks like just what I need. I see this answer is from 2016. Is this still up to date, we are using Confluence data center.

Davin Studer
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.
July 9, 2020

Yep. Should still work.

Michelle Rau good
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.
July 9, 2020

Super, I will work with our system admin to give it a try. BTW I am also in "the other Vancouver." :-) 

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events