mirror of
https://github.com/HangarMC/Hangar.git
synced 2024-11-21 01:21:54 +08:00
Allow changing case in usernames
This commit is contained in:
parent
5d4a526a92
commit
77b8fdef11
@ -124,7 +124,7 @@ public class AuthService extends HangarComponent implements UserDetailsService {
|
||||
@Transactional
|
||||
public void handleUsernameChange(final UserTable user, final String newName) {
|
||||
// make sure a user with that name doesn't exist yet
|
||||
if (this.userDAO.getUserTable(newName) != null) {
|
||||
if (this.userDAO.getUserTable(newName) != null && !user.getName().equalsIgnoreCase(newName)) {
|
||||
throw new HangarApiException("That username is unavailable");
|
||||
}
|
||||
// check that last change was long ago
|
||||
|
Loading…
Reference in New Issue
Block a user