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?
Community moderators have prevented the ability to post new answers.
Hi Francisco!
User key is not username, however it can match is some cases. Please see here:
In you case your can use getUserByName
ComponentAccessor.getUserManager().getUserByName(userName)
The problem disappear with this change. Thank you very much.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.