Search in sources :

Example 1 with RemindPasswordMailMessage

use of com.odysseusinc.arachne.portal.service.mail.RemindPasswordMailMessage 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);
}
Also used : RemindPasswordMailMessage(com.odysseusinc.arachne.portal.service.mail.RemindPasswordMailMessage) UserRegistrant(com.odysseusinc.arachne.portal.model.UserRegistrant)

Aggregations

UserRegistrant (com.odysseusinc.arachne.portal.model.UserRegistrant)1 RemindPasswordMailMessage (com.odysseusinc.arachne.portal.service.mail.RemindPasswordMailMessage)1