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

Problem when rename user

Francisco Javier Torres May 22, 2015

I have problem with user rename operation. I call method getUserByKey from UserManager class with modified username and the method return null object, but if I call with old username I get the user.

The problem are in DefaultUserManager class, this class search user in UserKeyStore and the new username doesn't found in this store.

ComponentAccessor.getUserManager().getUserByKey(userName)

Any suggestions?

1 answer

1 accepted

Comments for this post are closed

Community moderators have prevented the ability to post new answers.

Post a new question

1 vote
Answer accepted
Volodymyr Krupach
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.
May 22, 2015

Hi Francisco!

User key is not username, however it can match is some cases. Please see here:

https://developer.atlassian.com/jiradev/latest-updates/developer-changes-for-older-jira-versions/preparing-for-jira-6-0/renamable-users-in-jira-6-0

In you case your can use getUserByName

ComponentAccessor.getUserManager().getUserByName(userName)
Francisco Javier Torres May 22, 2015

The problem disappear with this change. Thank you very much.

TAGS
AUG Leaders

Atlassian Community Events