use of password.pwm.util.macro.MacroMachine in project pwm by pwm-project.
the class ActivateUserUtils method forwardToAgreementPage.
static void forwardToAgreementPage(final PwmRequest pwmRequest) throws ServletException, PwmUnrecoverableException, IOException {
final String agreementText = pwmRequest.getConfig().readSettingAsLocalizedString(PwmSetting.ACTIVATE_AGREEMENT_MESSAGE, pwmRequest.getLocale());
final MacroMachine macroMachine = MacroMachine.forUser(pwmRequest, ActivateUserServlet.userInfo(pwmRequest).getUserIdentity());
final String expandedText = macroMachine.expandMacros(agreementText);
pwmRequest.setAttribute(PwmRequestAttribute.AgreementText, expandedText);
pwmRequest.forwardToJsp(JspUrl.ACTIVATE_USER_AGREEMENT);
}
Aggregations