It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

Access to "About Me" text in user macro

Hi everyone,

I would like to write a simple user macro quite similar to the built-in macro "User Profile".

The macro should have the input of type "username" and the output...

User Full Name


User Profile Picture



That went well..but how do I get access these pieces of information?:

  1. the "About Me" text from the Profile
  2. the Phone-Number from the Personal Information
  3. and the position from the Company Information


Thank you in advance!


Beste regards

1 answer

1 vote
Thomas Schlegel Community Leader Jan 30, 2020

Hi @Manuel ,

the macro from 2012 by @Andreas_Gounaris is still working (I tried it just now) and returns exactly what you need. You can find it here:

I'm glad it still works, thanks @Thomas Schlegel  for mentioning! 

Like Thomas Schlegel likes this

Hi @Thomas Schlegel ,

Thank you for your reply. The description in the example you gave me is exactly what I was trying. I unserstand the logic of the code but apperently I'm stuck somewhere - maybe in the datatype I am handing over to the methods.

If I copy-paste the code of @Andreas Gounaris the out put looks like this:

<div> <b>Website: </b> $userDetailsManager.getStringProperty($action.remoteUser, 'website') </div> <div> <b>Location: </b> $userDetailsManager.getStringProperty($action.remoteUser, 'location') </div> <div> <b>About Me: </b> <div id="profile-about-me-content">$renderedAboutMe</div> </div>

An if I copy-paste the code of @Stefan Baader the output looks like this

<b>Profildaten von User $user.fullName ($</b> <div> <b>Website: </b> $userDetailsManager.getStringProperty($user, 'website') </div> <div> <b>Location: </b> $userDetailsManager.getStringProperty($user, 'location') </div> <div> <b>Position: </b> $userDetailsManager.getStringProperty($user, 'position') </div> <div> <b>Phone: </b> $userDetailsManager.getStringProperty($user, 'phone') </div> <div> <b>Department: </b> $userDetailsManager.getStringProperty($user, 'department') </div> <div> <b> </b> $userDetailsManager.getStringProperty($user, 'email') </div> <div> <b>About Me: </b> $renderedAboutMe </div>

Please help me to find the link. I'm probably close. Even if I enter "<...>" instead of &lt; and &gt;

Thank you in advance!

Beste regards

Thomas Schlegel Community Leader Jan 31, 2020

this is the code of the macro as it is working for me:


## @noparams

#set($containerManagerClass = $content.class.forName('com.atlassian.spring.container.ContainerManager'))
#set($getInstanceMethod = $containerManagerClass.getDeclaredMethod('getInstance',null))
#set($containerManager = $getInstanceMethod.invoke(null,null))
#set($containerContext = $containerManager.containerContext)
#set($userDetailsManager = $containerContext.getComponent('userDetailsManager'))
#set($personalInformationManager = $containerContext.getComponent('personalInformationManager'))
#set($wikiStyleRenderer = $containerContext.getComponent('wikiStyleRenderer'))

#set($pi = $personalInformationManager.getPersonalInformation($action.remoteUser))
#set($renderedAboutMe = $wikiStyleRenderer.convertWikiToXHtml($pi.toPageContext(), $pi.getBodyAsString()))

<b>$action.getText(''): </b>
$userDetailsManager.getStringProperty($action.remoteUser, 'website')
<b>$action.getText('confluence.user.profile.location'): </b>
$userDetailsManager.getStringProperty($action.remoteUser, 'location')
<b>$action.getText(''): </b>
<div id="profile-about-me-content">$renderedAboutMe</div>

This looks quite familiar to me, though the result on the confluence page looks like..

Website: $userDetailsManager.getStringProperty($action.remoteUser, 'website')
Location: $userDetailsManager.getStringProperty($action.remoteUser, 'location')
About Me:

We use Confluence Server 7.2.0. Is it maybe some configuration that's making the problem?

Any ideas?

Most probably you have no data in these fields on your profile.

No, I do. :-( 

Thomas Schlegel Community Leader Jan 31, 2020

Hmm, I tried with Confluence 6.15.9 - we don't have Confluence 7 yet. Maybe this is not working with Confluence 7 anymore. 

Suggest an answer

Log in or Sign up to answer
Community showcase
Posted in Confluence

Lessons and Learnings: Six Months of Working Remote [Discussion]

Hey there, folks! For most of us, the past six months- yes, you read that right- have been a journey. More people than ever before have pivoted to working remotely, and navigating being on-scre...

8,532 views 6 6
Join discussion

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you