Index: lams_central/conf/language/lams/ApplicationResources.properties
===================================================================
diff -u -rfd06ba812429b63a6dfcb0d8505800fe050fbfc9 -r1588362bc0e1320c4ddf1ae7f4bb37b2df910b50
--- lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision fd06ba812429b63a6dfcb0d8505800fe050fbfc9)
+++ lams_central/conf/language/lams/ApplicationResources.properties (.../ApplicationResources.properties) (revision 1588362bc0e1320c4ddf1ae7f4bb37b2df910b50)
@@ -266,20 +266,19 @@
signup.course.key =Course key
signup.submit =Submit
signup.email.verify.subject =LAMS: confirm email address
-signup.email.verify.body =Hi there,
\
-Please confirm your email address by clicking on the link below
\
-{0}
\
-Regards,
\
-LAMS Signup System
+signup.email.verify.body.1 =Hi there,
+signup.email.verify.body.2 =Please confirm your email address by clicking on the link below
+signup.email.verify.body.3 =Regards,
+signup.email.verify.body.4 =LAMS Signup System
signup.email.verify.sent =A confirmation email has been sent to {0}
Check your email and follow the instructions.
signup.email.verify.success =You email has been verified
signup.email.verify.fail =Your email could not be verified
signup.email.welcome.subject =LAMS: account details
-signup.email.welcome.body =Hi there,
\
-You've successfully registered an account with username {0} on the LAMS server at {1}.
\
-If you ever forget your password, you can reset it via this URL
{1}/forgotPassword.jsp
\
-Regards
\
-LAMS Signup System
+signup.email.welcome.body.1 =Hi there,
+signup.email.welcome.body.2 =You've successfully registered an account with username {0} on the LAMS server at {1}.
+signup.email.welcome.body.3 =If you ever forget your password, you can reset it via this URL
+signup.email.welcome.body.4 =Regards,
+signup.email.welcome.body.5 =LAMS Signup System
title.lams.signup =LAMS Signup
error.username.blank =Username cannot be blank
error.username.exists =Username is taken
Index: lams_central/src/java/org/lamsfoundation/lams/web/action/SignupAction.java
===================================================================
diff -u -rfd06ba812429b63a6dfcb0d8505800fe050fbfc9 -r1588362bc0e1320c4ddf1ae7f4bb37b2df910b50
--- lams_central/src/java/org/lamsfoundation/lams/web/action/SignupAction.java (.../SignupAction.java) (revision fd06ba812429b63a6dfcb0d8505800fe050fbfc9)
+++ lams_central/src/java/org/lamsfoundation/lams/web/action/SignupAction.java (.../SignupAction.java) (revision 1588362bc0e1320c4ddf1ae7f4bb37b2df910b50)
@@ -144,8 +144,15 @@
private void sendWelcomeEmail(User user) throws AddressException, MessagingException, UnsupportedEncodingException {
String subject = messageService.getMessage("signup.email.welcome.subject");
- String body = messageService.getMessage("signup.email.welcome.body",
- new Object[] { user.getLogin(), Configuration.get(ConfigurationKeys.SERVER_URL) });
+ String body = new StringBuilder(messageService.getMessage("signup.email.welcome.body.1")).append("
")
+ .append(messageService.getMessage("signup.email.welcome.body.2",
+ new Object[] { user.getLogin(), Configuration.get(ConfigurationKeys.SERVER_URL) }))
+ .append("
").append(messageService.getMessage("signup.email.welcome.body.3"))
+ .append("
").append(Configuration.get(ConfigurationKeys.SERVER_URL))
+ .append("forgotPassword.jsp
")
+ .append(messageService.getMessage("signup.email.welcome.body.4")).append("
")
+ .append(messageService.getMessage("signup.email.welcome.body.5")).toString();
boolean isHtmlFormat = true;
Emailer.sendFromSupportEmail(subject, user.getEmail(), body, isHtmlFormat);
@@ -154,10 +161,18 @@
private void sendVerificationEmail(User user)
throws AddressException, MessagingException, UnsupportedEncodingException {
String hash = HashUtil.sha256(user.getEmail(), user.getSalt());
- String link = Configuration.get(ConfigurationKeys.SERVER_URL) + "signup/signup.do?method=emailVerify&login="
- + URLEncoder.encode(user.getLogin(), "UTF-8") + "&hash=" + hash;
+ StringBuilder stringBuilder = new StringBuilder().append(Configuration.get(ConfigurationKeys.SERVER_URL))
+ .append("signup/signup.do?method=emailVerify&login=")
+ .append(URLEncoder.encode(user.getLogin(), "UTF-8")).append("&hash=").append(hash);
+ String link = stringBuilder.toString();
+
String subject = messageService.getMessage("signup.email.verify.subject");
- String body = messageService.getMessage("signup.email.verify.body", new Object[] { link });
+ stringBuilder = new StringBuilder(messageService.getMessage("signup.email.verify.body.1"))
+ .append("
").append(messageService.getMessage("signup.email.verify.body.2"))
+ .append("
").append(link).append("
")
+ .append(messageService.getMessage("signup.email.verify.body.3")).append("
")
+ .append(messageService.getMessage("signup.email.verify.body.4"));
+ String body = stringBuilder.toString();
boolean isHtmlFormat = true;
Emailer.sendFromSupportEmail(subject, user.getEmail(), body, isHtmlFormat);