- Timestamp:
- 01/05/22 15:57:29 (2 years ago)
- Branches:
- master
- Children:
- 6fa3d09
- Parents:
- 881a233
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/main/java/it/finki/charitable/controller/UserProfileController.java
r881a233 rb8dc761 115 115 fundsCollectedService.save(funds); 116 116 post.getFundsCollected().add(funds); 117 post.setTotalFundsCollected(post.getTotalFundsCollected() + amount); 117 118 donationPostService.save(post); 118 119 } … … 122 123 @ModelAttribute("user") 123 124 public AppUser addAttributes() { 124 if(SecurityContextHolder.getContext().getAuthentication().getPrincipal() != "anonymousUser") { 125 return (AppUser) SecurityContextHolder.getContext().getAuthentication().getPrincipal(); 125 if (SecurityContextHolder.getContext().getAuthentication().getPrincipal() != "anonymousUser") { 126 127 String email = SecurityContextHolder.getContext().getAuthentication().getName(); 128 return userService.loadUserByUsername(email); 126 129 } 127 130 return null;
Note:
See TracChangeset
for help on using the changeset viewer.