@Override
public void render(Environment env, Map params, TemplateDirectiveBody body) throws IOException, TemplateException {
String result = null;
Subject subject = getSubject();
Session session = getSubject().getSession();
String attr = getAttr(params);
String value = null;
if (subject != null && session != null && attr != null) {
if (log.isDebugEnabled()) {
log.debug("Attr is exsit.");
}
if (session.getAttribute(attr) != null) {
value = String.valueOf(session.getAttribute(attr));
if (value.equalsIgnoreCase("UnknownUserException")) {
result = "账户验证失败或已被禁用!";
} else if (value.equalsIgnoreCase("IncorrectCredentialsException")) {
result = "账户验证失败或已被禁用!";
} else if (value.equalsIgnoreCase("IncorrectCaptchaException")) {