Refactored User Details Service (#2)
This commit is contained in:
@ -25,7 +25,6 @@ public class UserServiceImpl implements UserService {
|
|||||||
.orElseThrow(() -> new UsernameNotFoundException("User with username `" + username + "` not found"));
|
.orElseThrow(() -> new UsernameNotFoundException("User with username `" + username + "` not found"));
|
||||||
user.setLastLoginDateDisplay(user.getLastLoginDate());
|
user.setLastLoginDateDisplay(user.getLastLoginDate());
|
||||||
user.setLastLoginDate(LocalDateTime.now());
|
user.setLastLoginDate(LocalDateTime.now());
|
||||||
userRepository.save(user);
|
|
||||||
return new UserPrincipal(user);
|
return new UserPrincipal(user);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user