Find "Unknown User" @mentions

Is there some way to find / report on @mentions which now have an unknown user, because the user no longer exists?

We want to be able to report on this so they can be cleaned up regularly.

I can search for pages mentioning a specific user, but not broken ones.

2 answers

Thanks Danny - link was malformed, it should be https://confluence.atlassian.com/confkb/how-to-get-a-list-of-all-unknown-user-in-confluence-867362827.html

 

Using that I get this SQL which does what I want:

SELECT um.username, c.contentid, c.title, s.spacekey
FROM CONTENT c
JOIN BODYCONTENT bc ON c.contentid = bc.contentid
JOIN SPACES s ON c.spaceid = s.spaceid
JOIN user_mapping um ON bc.body LIKE CONCAT('%<ri:user ri:userkey=\"', um.user_key, '\"%')
WHERE c.prevver IS NULL
AND c.contenttype IN ('PAGE', 'BLOGPOST')
AND bc.body LIKE '%<ri:user%'
AND um.lower_username NOT IN (SELECT lower_user_name FROM cwd_user)
0 vote
Danny Zuccaro Community Champion Sep 21, 2017

Hi Richard,

Found this support article that should help you get a list of unknown users - https://confluence.atlassian.com/confkb/how-to-get-a-list-of-all-unknown-user-in-confluence-867362827.html. 

Hope this helps,

Danny

Suggest an answer

Log in or Sign up to answer
How to earn badges on the Atlassian Community

How to earn badges on the Atlassian Community

Badges are a great way to show off community activity, whether you’re a newbie or a Champion.

Learn more
Community showcase
Posted Jul 10, 2018 in Confluence

We want to see the templates you've created in Confluence!

Hi Community, Jessica here from the Confluence Product Marketing team!  July’s community challenge is all about sharing pictures  — and as an extension of our first post on what ...

812 views 23 12
Join discussion

Atlassian User Groups

Connect with like-minded Atlassian users at free events near you!

Find a group

Connect with like-minded Atlassian users at free events near you!

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you