Hi All,
Hope you can help. We have a macro to show the profile pictures based on user groups. We use to run this code:
## @Param Group:title=Only use users in a specific group|desc=Choose a user group to list members of. Normally you wouldn't touch this.|default=confluence-users
## Get access to user data
#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'))
## Get members of a certain group
#set($groupManager = $containerManager.containerContext.getComponent("GroupResolver"))
#set($group = $groupManager.getGroup($paramGroup))
#set($users = $UserAccessor.getMemberNames($paramGroup))
But the getGroup is depreciated. I cannot find out how to get the users of a group based on the group name(string)
Can you help?
Eventually I got it fixed myself by updating the 2 last lines:
#set($group = $userAccessor.getGroupsByGroupNames([$paramGroup]))
#set($users = $userAccessor.getMemberNames($group.get(0)))
Hi, I am in the same situation, but I am not able to make it work, here my code:
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.