NIHVIVO-2845 the siteName was missing from the Freemarker body map. It was required by the email template.
This commit is contained in:
parent
fdc9f02b85
commit
9c0cd7f639
3 changed files with 7 additions and 5 deletions
|
@ -20,6 +20,7 @@ import org.apache.commons.logging.LogFactory;
|
||||||
|
|
||||||
import com.hp.hpl.jena.ontology.OntModel;
|
import com.hp.hpl.jena.ontology.OntModel;
|
||||||
|
|
||||||
|
import edu.cornell.mannlib.vitro.webapp.beans.ApplicationBean;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.PermissionSet;
|
import edu.cornell.mannlib.vitro.webapp.beans.PermissionSet;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
|
import edu.cornell.mannlib.vitro.webapp.beans.UserAccount;
|
||||||
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
import edu.cornell.mannlib.vitro.webapp.beans.VClass;
|
||||||
|
@ -186,4 +187,9 @@ public abstract class UserAccountsPage {
|
||||||
&& pw.length() <= UserAccount.MAX_PASSWORD_LENGTH;
|
&& pw.length() <= UserAccount.MAX_PASSWORD_LENGTH;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
protected String getSiteName() {
|
||||||
|
ApplicationBean appBean = vreq.getAppBean();
|
||||||
|
return appBean.getApplicationName();
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -92,6 +92,7 @@ public abstract class UserAccountsAddPageStrategy extends UserAccountsPage {
|
||||||
Map<String, Object> body = new HashMap<String, Object>();
|
Map<String, Object> body = new HashMap<String, Object>();
|
||||||
body.put("userAccount", page.getAddedAccount());
|
body.put("userAccount", page.getAddedAccount());
|
||||||
body.put("passwordLink", buildCreatePasswordLink());
|
body.put("passwordLink", buildCreatePasswordLink());
|
||||||
|
body.put("siteName", getSiteName());
|
||||||
|
|
||||||
FreemarkerEmailMessage email = FreemarkerEmailFactory
|
FreemarkerEmailMessage email = FreemarkerEmailFactory
|
||||||
.createNewMessage(vreq);
|
.createNewMessage(vreq);
|
||||||
|
|
|
@ -116,11 +116,6 @@ public abstract class UserAccountsEditPageStrategy extends UserAccountsPage {
|
||||||
sentEmail = true;
|
sentEmail = true;
|
||||||
}
|
}
|
||||||
|
|
||||||
private String getSiteName() {
|
|
||||||
ApplicationBean appBean = vreq.getAppBean();
|
|
||||||
return appBean.getApplicationName();
|
|
||||||
}
|
|
||||||
|
|
||||||
private String buildResetPasswordLink() {
|
private String buildResetPasswordLink() {
|
||||||
try {
|
try {
|
||||||
String email = page.getUpdatedAccount().getEmailAddress();
|
String email = page.getUpdatedAccount().getEmailAddress();
|
||||||
|
|
Loading…
Add table
Reference in a new issue