|
|
|
@ -78,7 +78,7 @@ public class OTPManagementServiceImpl implements OTPManagementService {
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
@Override
|
|
|
|
|
public void sendUserVerifyingMail(OTPWrapper otpWrapper) throws OTPManagementException, DeviceManagementException {
|
|
|
|
|
public String sendUserVerifyingMail(OTPWrapper otpWrapper) throws OTPManagementException, DeviceManagementException {
|
|
|
|
|
Tenant tenant = validateTenantCreatingDetails(otpWrapper);
|
|
|
|
|
OneTimePinDTO oneTimePinDTO = createOneTimePin(otpWrapper.getEmail(), otpWrapper.getEmailType(),
|
|
|
|
|
otpWrapper.getUsername(), tenant, -1234);
|
|
|
|
@ -90,6 +90,7 @@ public class OTPManagementServiceImpl implements OTPManagementService {
|
|
|
|
|
props.setProperty("otp-token", oneTimePinDTO.getOtpToken());
|
|
|
|
|
sendMail(props, tenant.getEmail(), DeviceManagementConstants.EmailAttributes.USER_VERIFY_TEMPLATE);
|
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
|
return oneTimePinDTO.getOtpToken();
|
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
|
String msg = "Error occurred while disabling AutoCommit.";
|
|
|
|
|
log.error(msg, e);
|
|
|
|
|