これは、以下のように login.jsp をフックし、liferay-ui:error タグで AuthException のメッセージをオーバーライドすることで実行できます。
Boolean isMaxFailedLoginAttempt = false;
PortletRequest portletRequest = (PortletRequest)request.getAttribute(JavaConstants.JAVAX_PORTLET_REQUEST);
if(SessionErrors.contains(portletRequest, AuthException.class.getName())) {
User u = UserLocalServiceUtil.getUserByEmailAddress(company.getCompanyId(), login);
if(u != null) {
if(u.getFailedLoginAttempts() == 5) {
isMaxFailedLoginAttempt = true;
}
}
}
if(isMaxFailedLoginAttempt) {
%>
<liferay-ui:error exception="<%= AuthException.class %>" message="The username or password you entered is incorrect; another incorrect login will temporarily lock your account. Please use forgot password link to reset the password." />
<%
} else {
%>
<liferay-ui:error exception="<%= AuthException.class %>" message="The username or password you entered is incorrect. Please try again." />
<%
}
%>
`