How to get a user by email in a JIRA plugin

Foo Baloo March 7, 2016

When writing a plugin for JIRA, how do you get a user, or just their username, given their email address?

It seems that you're supposed to use the findUsersByEmail method in the UserSearchService interface

https://docs.atlassian.com/jira/7.0.2/com/atlassian/jira/bc/user/search/UserSearchService.html

But how do you get an instance of this class? Or a singleton of it?

1 answer

0 votes
Vasiliy Zverev
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.
March 10, 2016

To get most of class instances ComponentAccessor

UserSearcherHelper userSearcherHelper = ComponentAccessor.getComponent(UserSearcherHelper.class);

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events