Insert profile picture for "current user"

Kamlesh Vishnuram November 29, 2018

In JQL you run a filter which displays the JIRA tickets for the current user.

 

[reporter = currentUser() order by created DESC ]

 

Is it possible to insert the "profile picture" macro but again for current user.

 

 

2 answers

1 vote
Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 29, 2018

Are you on server or cloud? If you are server you could create a user macro that dynamically creates a profile picture macro for the currently logged in user.

Kamlesh Vishnuram November 29, 2018

Hi. That's way too advanced for me.  ☺

 

I just started using confluence! 

 

Thanks all for your help!!

Davin Studer
Rising Star
Rising Star
Rising Stars are recognized for providing high-quality answers to other users. Rising Stars receive a certificate of achievement and are on the path to becoming Community Leaders.
November 30, 2018

In Confluence Administration -> User Macros create a new user macro with the below setup. Then you can go back to your page and add a Current User Profile Picture macro to your page to see the current user. In essence what the user macro below is doing is it has the storage format for the built-in user profile picture macro and it dynamically inserts the user key of the currently logged in user ($action.remoteUser.key). You can see the storage format for you page and any macros therein using either the Page Ellipsis Menu ->View Storage Format or with the Confluence Source Editor App (free).

Macro Name:
current-profile-picture

Macro Title:
Current User Profile Picture

Macro Body Processing:
No macro body

Description:
Displays the profile picture of the currently logged in user.

Template:

## Developed by: Davin Studer
## Date created: 11/30/2019

## @noparams
<ac:structured-macro ac:name="profile-picture" ac:schema-version="1">
    <ac:parameter ac:name="User">
        <ri:user ri:userkey="$action.remoteUser.key"/>
    </ac:parameter>
</ac:structured-macro>

 

0 votes
Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 29, 2018

The filters return user information in link format.  You can hover on the user link to view the profile.

Kamlesh Vishnuram November 29, 2018

Hi.

thanks for the reply.

 

But what I mean is can I use the "profile picture" macro but I want to display this for current user. 

 

Is there some sort of current user variable that we can pass into the macro?

Brant Schroeder
Community Leader
Community Leader
Community Leaders are connectors, ambassadors, and mentors. On the online community, they serve as thought leaders, product experts, and moderators.
November 29, 2018

Sorry I misread your initial question.  Unfortunately the profile picture macro does not accept variables.  It only allows you to display what was selected and does not have dynamic capabilities.  

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events