class UserService {

	@Scheduled(cron = "0 0 1 * * ?")
	public void removeNotActivatedUsers() {
		DateTime now = new DateTime();
		List<User> users = userRepository.findAllByActivatedIsFalseAndCreatedDateBefore(now.minusDays(3));
		for (User user : users) {
			log.debug("Deleting not activated user {}", user.getLogin());
			userRepository.delete(user);
		}
	}

}