@@ -28,7 +28,12 @@ public class UserAccountRegistrationServiceImpl implements UserAccountRegistrati
2828 private final JavaMailSender mailSender ;
2929
3030 @ Autowired
31- public UserAccountRegistrationServiceImpl (SimpleworklistProperties simpleworklistProperties , UserAccountRegistrationRepository userAccountRegistrationRepository , TokenGeneratorService tokenGeneratorService , JavaMailSender mailSender ) {
31+ public UserAccountRegistrationServiceImpl (
32+ SimpleworklistProperties simpleworklistProperties ,
33+ UserAccountRegistrationRepository userAccountRegistrationRepository ,
34+ TokenGeneratorService tokenGeneratorService ,
35+ JavaMailSender mailSender
36+ ) {
3237 this .simpleworklistProperties = simpleworklistProperties ;
3338 this .userAccountRegistrationRepository = userAccountRegistrationRepository ;
3439 this .tokenGeneratorService = tokenGeneratorService ;
@@ -38,7 +43,8 @@ public UserAccountRegistrationServiceImpl(SimpleworklistProperties simpleworklis
3843 @ Override
3944 public boolean registrationIsRetryAndMaximumNumberOfRetries (String email ) {
4045 UserAccountRegistration earlierOptIn = userAccountRegistrationRepository .findByEmail (email );
41- return earlierOptIn == null ?false :(earlierOptIn .getNumberOfRetries () >= simpleworklistProperties .getRegistration ().getMaxRetries ());
46+ return earlierOptIn == null ?false :(earlierOptIn .getNumberOfRetries ()
47+ >= simpleworklistProperties .getRegistration ().getMaxRetries ());
4248 }
4349
4450 @ Override
@@ -47,7 +53,8 @@ public void registrationCheckIfResponseIsInTime(String email) {
4753 UserAccountRegistration earlierOptIn = userAccountRegistrationRepository .findByEmail (email );
4854 if (earlierOptIn != null ) {
4955 Date now = new Date ();
50- if ((simpleworklistProperties .getRegistration ().getTtlEmailVerificationRequest () + earlierOptIn .getRowCreatedAt ().getTime ()) < now .getTime ()) {
56+ if ((simpleworklistProperties .getRegistration ().getTtlEmailVerificationRequest ()
57+ + earlierOptIn .getRowCreatedAt ().getTime ()) < now .getTime ()) {
5158 userAccountRegistrationRepository .delete (earlierOptIn );
5259 }
5360 }
@@ -109,10 +116,12 @@ private void sendEmailToRegisterNewUser(UserAccountRegistration o) {
109116 SimpleMailMessage msg = new SimpleMailMessage ();
110117 msg .setTo (o .getEmail ());
111118 msg .setText (
112- "Dear new User, "
119+ "Dear new User,\n \n "
113120 + "thank you for registring at Simple Worklist. \n "
114- + "Please validate your email and go to URL: \n http://" + urlHost + "/user/register/confirm/" + o .getToken ()
115- + "\n \n Sincerely Yours, The Team" );
121+ + "Please validate your email and go to URL: \n "
122+ + "http://" + urlHost + "/user/register/confirm/" + o .getToken ()
123+ + "\n \n Sincerely Yours, Simpleworklist Team"
124+ );
116125 msg .setSubject ("Your Registration at Simple Worklist" );
117126 msg .setFrom (mailFrom );
118127 try {
0 commit comments