diff --git a/config/alfresco/messages/webclient.properties b/config/alfresco/messages/webclient.properties index ff05789701..080c1eecc9 100644 --- a/config/alfresco/messages/webclient.properties +++ b/config/alfresco/messages/webclient.properties @@ -1589,6 +1589,7 @@ change_my_password_description=Use this view to change your password change_my_password_instructions=Enter your new password. old_password=Old Password new_password=New Password +error_incorrect_old_password=The 'Old Password' you entered was incorrect. edit_user_details=Edit User Profile edit_user_details_description=Use this view to change your user details and email address start_location=Start Location diff --git a/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java b/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java index bccf09fb7b..66c0811b48 100644 --- a/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java +++ b/source/java/org/alfresco/web/bean/users/ChangeMyPasswordDialog.java @@ -24,13 +24,10 @@ */ package org.alfresco.web.bean.users; -import java.text.MessageFormat; - import javax.faces.context.FacesContext; import org.alfresco.model.ContentModel; import org.alfresco.web.app.Application; -import org.alfresco.web.bean.repository.Repository; import org.alfresco.web.ui.common.Utils; public class ChangeMyPasswordDialog extends UsersDialog @@ -39,6 +36,7 @@ public class ChangeMyPasswordDialog extends UsersDialog private static final long serialVersionUID = 1965846039555088108L; private static final String MSG_FINISH_BUTTON = "finish_button"; + private static final String MSG_ERROR_INCORRECT_OLD_PASSWORD = "error_incorrect_old_password"; @Override protected String finishImpl(FacesContext context, String outcome) throws Exception @@ -78,7 +76,8 @@ public class ChangeMyPasswordDialog extends UsersDialog catch (Exception e) { outcome = null; - Utils.addErrorMessage(MessageFormat.format(Application.getMessage(newContext, Repository.ERROR_GENERIC), e.getMessage()), e); + Utils.addErrorMessage(Application.getMessage(FacesContext.getCurrentInstance(), + MSG_ERROR_INCORRECT_OLD_PASSWORD)); } } else