}
//@End()
public String processChangePassword()
{
FacesMessages messages = FacesMessages.instance();
if (!getNewPassword().equals(getNewPasswordConfirmed()))
{
String message = MessagesLoader.getMessageResourceString(facesContext.getApplication().getMessageBundle(), "form_ChangePassword_no_matching_password", null, facesContext.getViewRoot().getLocale());
messages.add(message);
return "/ChangePassword.xhtml";
}
user.setPassword(new DesEncrypter().encrypt(getNewPassword()));
entityManager.merge(user);
entityManager.flush();
messages.clear();
return "/Index.xhtml";
}