defaultUserDetailsManager does not work in user macro confluence server 7.3.1

Hello together,

We have currently updated our confluence instance to version 7.3.1 and our user information macro does not work properly anymore.

With this macro we used to retrieve the user profile information e.g. phone, location and IM.
Therefore we used the following code (part of the code):

@param Group:title=Group|type=string|required=true|desc=Group name

#set($containerManagerClass = $action.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(‘defaultUserDetailsManager’))
#set($personalInformationManager = $containerContext.getComponent(‘personalInformationManager’))

#set($userAccessor = $containerManager.containerContext.getComponent(‘userAccessor’))
#set($users = $userAccessor.getMembers($userAccessor.getGroup($paramGroup)) )

#foreach($user in $users)

#if(!$userAccessor.isDeactivated($user))

#set($phone = $userDetailsManager.getStringProperty($user, ‘phone’) )
#set($department = $userDetailsManager.getStringProperty($user, ‘Department’) )
#set($location = $userDetailsManager.getStringProperty($user, ‘Location’) )
#set($im = $userDetailsManager.getStringProperty($user, ‘IM’) )

#if(!$userDetailsManager.getStringProperty($user, ‘phone’) )
#set($phone = ‘-’)
#end

#if(!$userDetailsManager.getStringProperty($user, ‘Department’))
#set($department = ‘-’)
#end

#if(!$userDetailsManager.getStringProperty($user, ‘Location’))
#set($location = ‘-’)
#end

#if(!$userDetailsManager.getStringProperty($user, ‘IM’))
#set($im = ‘-’)
#end

For every user just the ‘-’ is displayed, so the method getStringProperty( ) does not work correctly.
I have already looked a the community post Can't use contentPropertyManager anymore in user macro since 7.0.3
But unfortunately, this did not really help.

Have anyone else already experienced the same problem?

Many thanks in advance & Best regards,
Birgit

Hello!

Seems to be a little bit similar than my problem.

BR,

Jarno

Hi,
please check my answer on:

Best
JP

Hello there,

There’s a new suggestion created to track the feedback for this so we can unify the feedback at one platform. Please refer to my comment below: