diff --git a/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/AuthenticatedUserProvider.java b/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/AuthenticatedUserProvider.java index 1f20588c8..00bc2f786 100644 --- a/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/AuthenticatedUserProvider.java +++ b/backend/kendo-tournament-core/src/main/java/com/softwaremagico/kt/core/providers/AuthenticatedUserProvider.java @@ -71,10 +71,8 @@ public Optional findByUsername(String username) { } if (getDatabaseEncryptionKey() != null) { //Username is encrypted, use hash - final Optional authenticatedUser = authenticatedUserRepository - .findByUsernameHash(username); + final Optional authenticatedUser = authenticatedUserRepository.findByUsernameHash(username); if (authenticatedUser.isPresent()) { - authenticatedUser.get().setUsernameHash(authenticatedUser.get().getUsername()); return Optional.of(authenticatedUser.get()); } } else {