|
|
@ -85,10 +85,10 @@ public class OTPManagementServiceImpl implements OTPManagementService {
|
|
|
|
try {
|
|
|
|
try {
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
ConnectionManagerUtil.beginDBTransaction();
|
|
|
|
this.otpManagementDAO.addOTPData(Collections.singletonList(oneTimePinDTO));
|
|
|
|
this.otpManagementDAO.addOTPData(Collections.singletonList(oneTimePinDTO));
|
|
|
|
Properties props = new Properties();
|
|
|
|
// Properties props = new Properties();
|
|
|
|
props.setProperty("first-name", tenant.getAdminFirstName());
|
|
|
|
// props.setProperty("first-name", tenant.getAdminFirstName());
|
|
|
|
props.setProperty("otp-token", oneTimePinDTO.getOtpToken());
|
|
|
|
// props.setProperty("otp-token", oneTimePinDTO.getOtpToken());
|
|
|
|
sendMail(props, tenant.getEmail(), DeviceManagementConstants.EmailAttributes.USER_VERIFY_TEMPLATE);
|
|
|
|
// sendMail(props, tenant.getEmail(), DeviceManagementConstants.EmailAttributes.USER_VERIFY_TEMPLATE);
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
ConnectionManagerUtil.commitDBTransaction();
|
|
|
|
return oneTimePinDTO.getOtpToken();
|
|
|
|
return oneTimePinDTO.getOtpToken();
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|
} catch (TransactionManagementException e) {
|
|
|
|