As an admin, how am I able to delete all of a users content?

I need the ability to delete a user's content/contributions on our company wiki,  if they exercise the right and ask for me to do so. Is this possible? I am an administrator will full capabilities. 

1 answer

This widget could not be displayed.
Ann Worley Atlassian Team Jun 26, 2017

 

Confluence doesn't provide the ability to delete content based on the creator. I didn't find a plugin for it, either.

I did test some direct database queries, which can be used if you absolutely must delete all of a user's content. You definitely want to back up the database before running any delete statements!

To find the user's content, first use this query to get the user's key from the user_mapping table. This key is used in the other tables to identify the user:

 

select username, user_key from user_mapping where lower_username = 'your_user's_name_here'

After you have the key, you can use it to find content from the user:

 

 

select c.contenttype, c.title, s.spacekey, c.creator, c.lastmodifier from content as c, spaces as s where c.spaceid = s.spaceid and (c.creator='user_key' or c.lastmodifier='user_key');

I will let you construct the corresponding delete statement based on the provided queries.

 

This suggestion ticket is worth watching for your use case:

List user's content when warning that user cannot be removed

 

 

Suggest an answer

Log in or Sign up to answer
Atlassian Summit 2018

Meet the community IRL

Atlassian Summit is an excellent opportunity for in-person support, training, and networking.

Learn more
Community showcase
Posted Wednesday in Teamwork

What teamwork quotes inspire you?

Hey everyone! My name is Natalie and I'm an editor of the Atlassian Blog and I've got a question for you: What's your favorite quote about teamwork?  We've compiled a list here, along with...

162 views 16 7
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