Or like this
import com.atlassian.jira.component.ComponentAccessor
import com.atlassian.jira.bc.user.search.UserSearchService
import com.atlassian.jira.bc.user.search.UserSearchParams
import com.atlassian.jira.user.ApplicationUser
UserSearchService userSearchService = ComponentAccessor.getComponent(UserSearchService.class);
UserSearchParams userSearchParams = (new UserSearchParams.Builder()).allowEmptyQuery(true).includeActive(false).includeInactive(true).maxResults(100000).build();
for (ApplicationUser appUser : userSearchService.findUsers("", userSearchParams)) {
your code
}
List<GenericValue> users = ComponentAccessor.getOfBizDelegator().findAll("User");
List<String> usernames=new ArrayList<>();
for(GenericValue user: users){
if(user.getInt("active")==0){
usernames.add(user.getString("lowerUserName")):
}
}
return usernames;
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Online forums and learning are now in one easy-to-use experience.
By continuing, you accept the updated Community Terms of Use and acknowledge the Privacy Policy. Your public name, photo, and achievements may be publicly visible and available in search engines.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.