From 3a083aa1645ebe34f9c00a8253b7e1e8a9988a6a Mon Sep 17 00:00:00 2001 From: Software Magico Date: Thu, 9 May 2024 16:34:27 +0200 Subject: [PATCH] Encrypting createdBy and updatedBy --- .../kt/core/providers/AuthenticatedUserProvider.java | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) 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 {