Join the Conversation

10 Comments

  1. Simon,

    I got this to work:

    —————————————————-
    You are: {report-image:global:current user > user:picture} {report-info:global:current user > full name}
    —————————————————-

    Now what I’d like to know is how to display the picture of a specific user on a page. Any thoughts there?

    Thom

  2. Hi Thom, thanks for the comment. Looking at the documentation, there’s an example of :

    {report-image:content:creator > user:picture}

    and the recipe for Contact Cards shows the macro being used within another context. I’d suggest asking the question in the comments over there; David Petersen, one of the main guys at Customware, is always very helpful.

  3. You are a life saver. I have been trying to get the profile picture displayed in a business card layout for our dashboard for a month. Adaptavist and Atlassian documentation have been no help. Thank you! Thank you! THANK YOU!

  4. Hi Liz, thanks for dropping by and I’m glad this was helpful! If you’re using this, or any other recipe, to display the user profile picture in multiple situations, beware – all the methods I’ve tried fail in one place or another, so be sure you’ve checked everywhere. If you’re just using it in one location, like a standard Confluence page, then it’s not a worry.

  5. Hey Simon,

    I know it’s been a while since you added this entry but I just tried your macro and it’s not working. =( It says “Your profile picture” within a box that has an ‘X’ in it. The link works but the actual picture doesn’t show. I’m running Confluence 2.8 and using Theme Builder 3.2.1. I’m trying to use the macro within the title panel. Can you help?

  6. Hi,

    The macro didn’t work for me too with Confluence 2.8.0

    My concern is a little bit different, because i wan’t to get profile picture of any user : so i add a parameter. Note that $req.userPrincipal.name is not working anymore (but why ??)

    #set($profile_pic=$userAccessor.getUserProfilePicture($param0))
    #set($pic_src=$profile_pic.getDownloadPath())
    #set($baseurl=$action.getGlobalSettings().getBaseUrl())

    Jean.

  7. Thanks. Works fine for me in 3.1

    If you want to show the pic of a certain user e.g. for a static team gallery you can use:

    {user_profile_pic:username}

    with the changed code:

    #set( $profile_pic = $userAccessor.getUserProfilePicture( $param0 ) )
    #set( $pic_src = $profile_pic.getDownloadPath() )

  8. Simon,

    Thanks for sharing this. I’m using 3.4 and I needed to add the complete path to get it to work:

    #set($baseurl=$action.getGlobalSettings().getBaseUrl())
    #set( $profile_pic = $userAccessor.getUserProfilePicture( $req.userPrincipal.name ) )
    #set( $pic_src = $baseurl + $profile_pic.getDownloadPath() )

Leave a comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.