Skip to content

Commit

Permalink
Updated to support macros in Password Change Message
Browse files Browse the repository at this point in the history
  • Loading branch information
jalbr74 committed Jan 6, 2016
1 parent 6ae71cb commit 5b13b06
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions src/main/webapp/WEB-INF/jsp/changepassword.jsp
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@

<!DOCTYPE html>
<%@ page import="password.pwm.bean.PasswordStatus" %>
<%@ page import="password.pwm.util.macro.MacroMachine" %>
<%@ page language="java" session="true" isThreadSafe="true" contentType="text/html" %>
<%@ taglib uri="pwm" prefix="pwm" %>
<% final PwmRequest changepassword_pwmRequest = PwmRequest.forRequest(request,response); %>
Expand All @@ -43,9 +44,12 @@
<pwm:DisplayPasswordRequirements separator="</li>" prepend="<li>"/>
</ul>
</div>
<% final String passwordPolicyChangeMessage = changepassword_pwmRequest.getPwmSession().getUserInfoBean().getPasswordPolicy().getRuleHelper().getChangeMessage(); %>
<%
final String passwordPolicyChangeMessage = changepassword_pwmRequest.getPwmSession().getUserInfoBean().getPasswordPolicy().getRuleHelper().getChangeMessage();
MacroMachine macroMachine = JspUtility.getPwmSession(pageContext).getSessionManager().getMacroMachine(ContextManager.getPwmApplication(session));
%>
<% if (passwordPolicyChangeMessage.length() > 1) { %>
<p><%= passwordPolicyChangeMessage %></p>
<p><%= macroMachine.expandMacros(passwordPolicyChangeMessage) %></p>
<% } %>
<br/>
<%@ include file="fragment/message.jsp" %>
Expand Down

0 comments on commit 5b13b06

Please sign in to comment.