Skip to content
This repository was archived by the owner on Apr 5, 2024. It is now read-only.

Commit bd373b7

Browse files
authored
fix missing update of lowsercaseUsername (#97)
1 parent 9035d2a commit bd373b7

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

src/main/java/de/filefighter/rest/domain/user/business/UserBusinessService.java

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -27,13 +27,11 @@
2727
@Service
2828
public class UserBusinessService {
2929

30+
public static final int USER_ID_MAX = 99999999;
3031
private final UserRepository userRepository;
3132
private final UserDTOService userDtoService;
3233
private final GroupRepository groupRepository;
3334
private final MongoTemplate mongoTemplate;
34-
35-
public static final int USER_ID_MAX = 99999999;
36-
3735
@Value("${filefighter.disable-password-check}")
3836
public boolean passwordCheckDisabled;
3937

@@ -241,6 +239,7 @@ private boolean updateUserName(Update update, String username) {
241239
throw new UserNotUpdatedException("Username already taken.");
242240

243241
update.set("username", username);
242+
update.set("lowercaseUsername", username.toLowerCase());
244243
return true;
245244
}
246245
return false;

0 commit comments

Comments
 (0)