diff --git a/src/main/java/de/bstly/board/businesslogic/UserManager.java b/src/main/java/de/bstly/board/businesslogic/UserManager.java index 480efb2..9620991 100644 --- a/src/main/java/de/bstly/board/businesslogic/UserManager.java +++ b/src/main/java/de/bstly/board/businesslogic/UserManager.java @@ -241,7 +241,8 @@ public class UserManager implements UserDetailsService, SmartInitializingSinglet if (!user.getMetadata().containsKey("points")) { long points = 0; - for (Entry entry : entryRepository.findAll(qEntry.author.equalsIgnoreCase(username))) { + for (Entry entry : entryRepository + .findAll(qEntry.author.equalsIgnoreCase(user.getUsername()))) { points += entryManager.getUserPoints(entry.getId(), user.getUsername()); } user.getMetadata().put("points", points);