Skip to content

Commit

Permalink
pre-set email address
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelwechner committed May 2, 2012
1 parent 09fedcc commit 2ef0d64
Showing 1 changed file with 5 additions and 1 deletion.
Expand Up @@ -168,7 +168,11 @@ private void processUserAction(HttpServletRequest request, Document adoc) throws
if ((smtpEmailServer != null && smtpEmailServerPort != null) || (getYanel().getSMTPHost() != null && getYanel().getSMTPPort() >= 0)) {
String from = getResourceConfigProperty("smtpFrom");
if (from != null) {
rootElement.appendChild(adoc.createElementNS(NAMESPACE, "requestemail"));
Element requestEmailElement = (Element) rootElement.appendChild(adoc.createElementNS(NAMESPACE, "requestemail")); // INFO: A phone application might have cached the email address and hence wants to auto-complete the form...
String emailAddress = getEnvironment().getRequest().getParameter("email");
if (emailAddress != null) {
requestEmailElement.appendChild(adoc.createTextNode(emailAddress));
}
} else {
Element exceptionElement = (Element) rootElement.appendChild(adoc.createElementNS(NAMESPACE, "exception"));
String resConfigFilename = "global-resource-configs/user-forgot-pw_yanel-rc.xml";
Expand Down

0 comments on commit 2ef0d64

Please sign in to comment.