I would like to increase the expiration time of the mail sent when a person registers.
I do not see where the expiration time is set
I would like to increase the expiration time of the mail sent when a person registers.
I do not see where the expiration time is set
JHipster's register activation email does not have an expiration time, but unactivated accounts are removed after 3 days by default. You can change this timing in UserService.java
:
/**
* Not activated users should be automatically deleted after 3 days.
* <p>
* This is scheduled to get fired everyday, at 01:00 (am).
*/
@Scheduled(cron = "0 0 1 * * ?")
public void removeNotActivatedUsers() {
userRepository
.findAllByActivatedIsFalseAndActivationKeyIsNotNullAndCreatedDateBefore(Instant.now().minus(3, ChronoUnit.DAYS))
.forEach(user -> {
log.debug("Deleting not activated user {}", user.getLogin());
userRepository.delete(user);
this.clearUserCaches(user);
});
}