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

Retrieve profile pictures using SQL

DanielG
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.
October 7, 2011

Hi all,

Does anyone have a suggested SQL query that would determine the location of the current profie picture of a given user?

I'm using Confluence 3.5.7

Thanks,

Daniel

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Answer accepted
Remo Siegwart
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.
October 28, 2011

The following query should do the job (replace "yourusername" with the username):

SELECT string_val
FROM os_propertyentry
WHERE entity_key = "confluence.user.profile.picture" AND entity_name = "CWD_yourusername"

This returns the attachment title of the profile picture if the user has a custom pic, or the path to a default avatar in Confluence. The attachment data is either in the attachment folder on the file system or in the table ATTACHMENTDATA.

Cheers
Remo

TAGS
AUG Leaders

Atlassian Community Events