Maybe fix usernames not being updated in storage after name changes (#301)

This commit is contained in:
Luck
2017-06-03 16:40:04 +01:00
Unverified
parent 306e252c31
commit 7b8654339c
2 changed files with 14 additions and 1 deletions
@@ -71,6 +71,15 @@ public class GenericUserManager extends AbstractManager<UserIdentifier, User> im
return true;
}
@Override
public User getOrMake(UserIdentifier id) {
User ret = super.getOrMake(id);
if (id.getUsername().isPresent()) {
ret.setName(id.getUsername().get(), false);
}
return ret;
}
/**
* Check whether the user's state indicates that they should be persisted to storage.
*