use of com.odysseusinc.arachne.portal.model.UserRegistrant in project ArachneCentralAPI by OHDSI.
the class BaseUserServiceImpl method sendRemindPasswordEmail.
@Override
public void sendRemindPasswordEmail(U user, String token, String registrantToken, String callbackUrl) {
RemindPasswordMailMessage mail = new RemindPasswordMailMessage(user, WebSecurityConfig.portalUrl.get(), token);
Optional<UserRegistrant> userRegistrant = userRegistrantService.findByToken(registrantToken);
userRegistrant.ifPresent(registrant -> userRegistrantService.customizeUserRegistrantMailMessage(registrant, callbackUrl, mail));
arachneMailSender.send(mail);
}
Aggregations