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

Next challenges

Recent achievements

  • Global
  • Personal


  • Give kudos
  • Received
  • Given


  • Global

Trophy case

Kudos (beta program)

Kudos logo

You've been invited into the Kudos (beta program) private group. Chat with others in the program, or give feedback to Atlassian.

View group

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

User macro help Edited

This macro is designed to show a list of all users with brief information, such as a photo, full name, email, position and department.

Everything worked on 6.15.1 but with the upgrade to 7.1.1 the position and department stopped working. I dug through all the release notes, but did not find what changed. Any help would be appreciated


## @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($loginManager = $containerContext.getComponent('loginManager'))
#set($crowdService = $containerContext.getComponent('crowdService'))
#set($conf_users = $userAccessor.getGroup("confluence-users"))
#set($users = $userAccessor.getMemberNames($conf_users))
#set($bots = ['admin','conf_adm','root','gdadmin'])
#set($count = 0)

#foreach($user in $users)
#if ($bots.contains($user))
##special user/bot
#set($count = $count + 1)
#set($userN = $userAccessor.getUser($user))
#set($crowdUser = $crowdService.getUser($
#set($pi = $personalInformationManager.getPersonalInformation($userN))
#set($renderedAboutMe = $wikiStyleRenderer.convertWikiToXHtml($pi.toPageContext(), $pi.getBodyAsString()))
<div class="sc-user" style="border:1px solid; width: 220px; height: 270px; padding: 10px; text-align: center; margin: 5px; float: left; overflow: auto;">
<img class="userLogo logo" src="$userAccessor.getUserProfilePicture($userN).getUriReference()" alt="User icon: $user" title="" style="height: 128px; width: 128px;" />
#if ($userDetailsManager.getStringProperty($userN, 'position'))
<p>$userDetailsManager.getStringProperty($userN, 'position')</p>
<p style="color:red">No position</p>

#if ($userDetailsManager.getStringProperty($userN, 'department'))
<p>$userDetailsManager.getStringProperty($userN, 'department')</p>
<p style="color:red">No department</p>


<p>$action.dateFormatter.formatGivenString('yyyy/MM/dd', $crowdUser.createdDate)</p>

<p style="clear:both;padding:10px">Total users: $count.</p>


3 answers

I would guess you are using a class that was deprecated in the 7.x release. Check out these links..

Check with your system admin if that is not you to see if you also upgraded Java to 11. Shouldn't affect anything but worth a look.

Hi evzensx,

Did you ever resolve this, we have just upgraded to 7.4.1 and have the same issue. I'm guessing the Container Manager is no longer available. Did you find a workaround?

Hi evzensx,

After spending hours and hours searching for a solution, I finally found one post that had the answer, so now there will be 2 posts.

The problem is not with Java or deprecated code in 7.x. The issue is because, in Confluence 7.x, they turned on additional security features in the Velocity engine, which is preventing the class reflection from working.

Once I re-enabled this, it started to work. My User Macro also displays how many days since the Users last login, which I use for user cleanup purposes, so I needed to re-enable another couple of classes as well before the User Macro was fully working.

So, the solution is to edit the file: confluence/WEB-INF/

and comment out/change the following lines....


introspector.restrict.packages = java.lang.reflect,\


introspector.restrict.packages = \


introspector.restrict.classes = java.lang.Class,\


introspector.restrict.classes = \

comment out these 2 lines:


I hope this helps others....

Suggest an answer

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

What do you think is the most *delightful* Confluence feature? Comment for a prize!

- Create your own custom emoji 🔥 - "Shake for Feedback" on mobile 📱 - An endless supply of GIFs via GIPHY 🤩 Is there anything quite as nice as a pleasant surprise? Comment below with what...

480 views 24 9
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