It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

List inactive users using a plugin

Angel Montenegro Oct 01, 2012

Hi,

I'm writing a plugin to get some information from confluence. That information includes a list of all inactive (deleted) users that has written a comment on a specific space.

How to do that using the Confluence Plugin API?

I tried using the following managers, but all of them work only with active users:

  • SpaceManager
  • UserManager
  • SpacePermissionManager
  • PermissionManager

I really need some help here.

Thanks a lot.

2 answers

1 accepted

0 votes
Answer accepted
Michael Danielsson Oct 02, 2012

You can use

userAccessor.isDeactivated(user)

to examine if the user is deactivated.

If your plugin extends the class ConfluenceActionSupport you can get the userAccessor by the help of the method getUserAccessor().

0 votes

Hi Angel,

I think the following documents might be of some use to help you develop a plugin to identify inactive users:

https://confluence.atlassian.com/display/CONFKB/How+to+Identify+Inactive+Users+in+Confluence
https://developer.atlassian.com/display/CONFDEV/Confluence+Plugin+Guide

All the best,
John

Matthew Cobby Oct 01, 2012

It will work when the website is back up again. Atlassian seem to be having some issues with servers today, this is the 2nd service that's been down today. maybe it's upgrade day!

Angel Montenegro Oct 01, 2012

Hi John,

The first link doesnt work https://confluence.atlassian.com/display/CONFKB/How+to+Identify+Inactive+Users+in+Confluence

Is that the right link?

Thanks

Angel Montenegro Oct 02, 2012

Hey Matthew, do you know how to execute queries inside the plugin?

In order to get the list of inactive users I need to perform the following quer:

select * from cwd_user
where active = 'F';
But I dont know how to do that using the search classes provided on Confluence, I tried with the following classes, but I couldnt construct a query to get the inactive users:
import com.atlassian.confluence.search.v2.ISearch;
import com.atlassian.confluence.search.v2.QueryFactory;
import com.atlassian.confluence.search.v2.SearchManager;
import com.atlassian.confluence.search.v2.SearchQuery;
import com.atlassian.confluence.search.v2.query.AllQuery;
Any help will be greatly appreciated.

Suggest an answer

Log in or Sign up to answer
This widget could not be displayed.
This widget could not be displayed.
Community showcase
Posted in Off-topic

Disney Live Action Reboots: Are you for or against?

Happy Friday Everyone! Today marks the international release of Disney's live action version of the animated classic Aladdin. I know that this movie was met with some controversy of over cast...

192 views 21 10
Join discussion

Community Events

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

Find an event

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

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you