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

How to use com.atlassian.user.search.query.UserQuery to get inactive users?

Angel Montenegro October 1, 2012

Hi,

I would like to create a query that returns all inactive users on Confluence.

I know that I can do that by using com.atlassian.confluence.user.UserAccessor using the function findUsersAsList, but, I dont know how to write the Query object (com.atlassian.user.search.query.UserQuery) to return that info.

Can anybody help me with this?

Thanks

1 answer

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

2 votes
Boris Georgiev _Appfire_
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.
July 10, 2013

If you can use crowd the code will be something like:

final CrowdService crowdService = ...;
UserQuery<User> query = new UserQuery<User>(User.class, new TermRestriction<Boolean>(UserTermKeys.ACTIVE, false), 0, EntityQuery.ALL_RESULTS);
return crowdService.search(query);

TAGS
AUG Leaders

Atlassian Community Events