diff --git a/applications/accounting/webapp/accounting/WEB-INF/controller.xml b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
index d56e9bd94b..2a892faf88 100644
--- a/applications/accounting/webapp/accounting/WEB-INF/controller.xml
+++ b/applications/accounting/webapp/accounting/WEB-INF/controller.xml
@@ -60,6 +60,7 @@ under the License.
+
@@ -1366,7 +1367,8 @@ under the License.
-
+
+
diff --git a/applications/accounting/widget/CommonScreens.xml b/applications/accounting/widget/CommonScreens.xml
index d9c869045e..e366316e14 100644
--- a/applications/accounting/widget/CommonScreens.xml
+++ b/applications/accounting/widget/CommonScreens.xml
@@ -320,4 +320,17 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/content/webapp/content/WEB-INF/controller.xml b/applications/content/webapp/content/WEB-INF/controller.xml
index 26386c214f..7cec2f3c5c 100644
--- a/applications/content/webapp/content/WEB-INF/controller.xml
+++ b/applications/content/webapp/content/WEB-INF/controller.xml
@@ -58,7 +58,8 @@ under the License.
-
+
+
@@ -1680,6 +1681,7 @@ under the License.
+
diff --git a/applications/content/widget/CommonScreens.xml b/applications/content/widget/CommonScreens.xml
index fdb42f0f02..d308ff761f 100644
--- a/applications/content/widget/CommonScreens.xml
+++ b/applications/content/widget/CommonScreens.xml
@@ -317,6 +317,19 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml b/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
index 0cb0dd8a05..7fcc036df5 100644
--- a/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
+++ b/applications/ecommerce/webapp/ecommerce/WEB-INF/controller.xml
@@ -86,6 +86,7 @@ under the License.
+
@@ -1557,6 +1558,7 @@ under the License.
+
diff --git a/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl b/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl
new file mode 100644
index 0000000000..faa2cdfc92
--- /dev/null
+++ b/applications/ecommerce/webapp/ecommerce/requirePasswordChange.ftl
@@ -0,0 +1,68 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#assign username = ""/>
+<#if requestParameters.USERNAME?has_content>
+ <#assign username = requestParameters.USERNAME/>
+<#elseif autoUserLogin?has_content>
+ <#assign username = autoUserLogin.userLoginId/>
+#if>
+
+
${uiLabelMap.CommonLogin}
+
+
+
+
+
${uiLabelMap.CommonRegistered}
+
+
+
+
+
+
+
diff --git a/applications/ecommerce/widget/CommonScreens.xml b/applications/ecommerce/widget/CommonScreens.xml
index 39fdf33160..c54e2652af 100644
--- a/applications/ecommerce/widget/CommonScreens.xml
+++ b/applications/ecommerce/widget/CommonScreens.xml
@@ -244,6 +244,24 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/humanres/webapp/humanres/WEB-INF/controller.xml b/applications/humanres/webapp/humanres/WEB-INF/controller.xml
index a7e7ea9f54..8f077897ab 100644
--- a/applications/humanres/webapp/humanres/WEB-INF/controller.xml
+++ b/applications/humanres/webapp/humanres/WEB-INF/controller.xml
@@ -62,6 +62,7 @@ under the License.
+
@@ -535,6 +536,7 @@ under the License.
+
diff --git a/applications/humanres/widget/CommonScreens.xml b/applications/humanres/widget/CommonScreens.xml
index 2c4e0178c4..f7b882a41c 100644
--- a/applications/humanres/widget/CommonScreens.xml
+++ b/applications/humanres/widget/CommonScreens.xml
@@ -191,4 +191,17 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml b/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
index 3b1cf54b8e..64b0889b40 100644
--- a/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
+++ b/applications/manufacturing/webapp/manufacturing/WEB-INF/controller.xml
@@ -61,6 +61,7 @@ under the License.
+
@@ -753,6 +754,7 @@ under the License.
+
diff --git a/applications/manufacturing/widget/manufacturing/CommonScreens.xml b/applications/manufacturing/widget/manufacturing/CommonScreens.xml
index 6866a78fa4..45f5868b07 100644
--- a/applications/manufacturing/widget/manufacturing/CommonScreens.xml
+++ b/applications/manufacturing/widget/manufacturing/CommonScreens.xml
@@ -56,5 +56,18 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/marketing/webapp/marketing/WEB-INF/controller.xml b/applications/marketing/webapp/marketing/WEB-INF/controller.xml
index 3826bbef47..b3beb8a777 100644
--- a/applications/marketing/webapp/marketing/WEB-INF/controller.xml
+++ b/applications/marketing/webapp/marketing/WEB-INF/controller.xml
@@ -62,6 +62,7 @@ under the License.
+
@@ -407,6 +408,7 @@ under the License.
+
diff --git a/applications/marketing/widget/CommonScreens.xml b/applications/marketing/widget/CommonScreens.xml
index 9c8cb45717..57c0541cf5 100644
--- a/applications/marketing/widget/CommonScreens.xml
+++ b/applications/marketing/widget/CommonScreens.xml
@@ -113,4 +113,17 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/order/webapp/ordermgr/WEB-INF/controller.xml b/applications/order/webapp/ordermgr/WEB-INF/controller.xml
index 0ccc81c741..110f91e2d5 100644
--- a/applications/order/webapp/ordermgr/WEB-INF/controller.xml
+++ b/applications/order/webapp/ordermgr/WEB-INF/controller.xml
@@ -61,6 +61,7 @@ under the License.
+
@@ -1512,6 +1513,7 @@ under the License.
+
diff --git a/applications/order/widget/ordermgr/CommonScreens.xml b/applications/order/widget/ordermgr/CommonScreens.xml
index 8caaccced4..711c2f81a6 100644
--- a/applications/order/widget/ordermgr/CommonScreens.xml
+++ b/applications/order/widget/ordermgr/CommonScreens.xml
@@ -131,6 +131,18 @@ under the License.
-
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/party/webapp/partymgr/WEB-INF/controller.xml b/applications/party/webapp/partymgr/WEB-INF/controller.xml
index 4900e7a626..44f9865401 100644
--- a/applications/party/webapp/partymgr/WEB-INF/controller.xml
+++ b/applications/party/webapp/partymgr/WEB-INF/controller.xml
@@ -58,6 +58,7 @@ under the License.
+
@@ -913,6 +914,7 @@ under the License.
+
diff --git a/applications/party/webapp/partymgr/party/PartyForms.xml b/applications/party/webapp/partymgr/party/PartyForms.xml
index 7a7ef8061a..3ec5575ff6 100644
--- a/applications/party/webapp/partymgr/party/PartyForms.xml
+++ b/applications/party/webapp/partymgr/party/PartyForms.xml
@@ -85,6 +85,9 @@ under the License.
+
+
+
diff --git a/applications/party/widget/partymgr/CommonScreens.xml b/applications/party/widget/partymgr/CommonScreens.xml
index a65672a962..fc1241577b 100644
--- a/applications/party/widget/partymgr/CommonScreens.xml
+++ b/applications/party/widget/partymgr/CommonScreens.xml
@@ -284,6 +284,19 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/product/webapp/catalog/WEB-INF/controller.xml b/applications/product/webapp/catalog/WEB-INF/controller.xml
index 965e99c934..fda7345a07 100644
--- a/applications/product/webapp/catalog/WEB-INF/controller.xml
+++ b/applications/product/webapp/catalog/WEB-INF/controller.xml
@@ -60,6 +60,7 @@ under the License.
+
@@ -2378,6 +2379,7 @@ under the License.
+
diff --git a/applications/product/webapp/facility/WEB-INF/controller.xml b/applications/product/webapp/facility/WEB-INF/controller.xml
index 7c3826a89e..f06eab8781 100644
--- a/applications/product/webapp/facility/WEB-INF/controller.xml
+++ b/applications/product/webapp/facility/WEB-INF/controller.xml
@@ -60,6 +60,7 @@ under the License.
+
@@ -1128,6 +1129,7 @@ under the License.
+
diff --git a/applications/product/widget/catalog/CommonScreens.xml b/applications/product/widget/catalog/CommonScreens.xml
index c2a167ebc0..22af6d6786 100644
--- a/applications/product/widget/catalog/CommonScreens.xml
+++ b/applications/product/widget/catalog/CommonScreens.xml
@@ -148,4 +148,17 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/product/widget/facility/CommonScreens.xml b/applications/product/widget/facility/CommonScreens.xml
index 359387d624..76cf45eba8 100644
--- a/applications/product/widget/facility/CommonScreens.xml
+++ b/applications/product/widget/facility/CommonScreens.xml
@@ -55,6 +55,19 @@ under the License.
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java b/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
index a7c8ef85b0..3487f9c91a 100644
--- a/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
+++ b/applications/securityext/src/org/ofbiz/securityext/login/LoginEvents.java
@@ -339,7 +339,7 @@ public class LoginEvents {
public static String storeLogin(HttpServletRequest request, HttpServletResponse response) {
String responseString = LoginWorker.login(request, response);
- if ("error".equals(responseString)) {
+ if (!"success".equals(responseString)) {
return responseString;
}
// if we logged in okay, do the check store customer role
diff --git a/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml b/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
index d8801051ab..617957733b 100644
--- a/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
+++ b/applications/workeffort/webapp/workeffort/WEB-INF/controller.xml
@@ -56,6 +56,7 @@ under the License.
+
@@ -606,6 +607,7 @@ under the License.
+
diff --git a/applications/workeffort/widget/CommonScreens.xml b/applications/workeffort/widget/CommonScreens.xml
index 178191451b..6c9dfc1248 100644
--- a/applications/workeffort/widget/CommonScreens.xml
+++ b/applications/workeffort/widget/CommonScreens.xml
@@ -176,6 +176,19 @@
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/framework/common/config/CommonUiLabels.properties b/framework/common/config/CommonUiLabels.properties
index cf10f116bc..082d4a5f96 100644
--- a/framework/common/config/CommonUiLabels.properties
+++ b/framework/common/config/CommonUiLabels.properties
@@ -113,6 +113,7 @@ CommonCreatedBy=Created By
CommonCredit=Credit
CommonCurrency=Currency
CommonCurrent=Current
+CommonCurrentPassword=Current Password
CommonDatabaseProblem=Database Problem
CommonDate=Date
CommonDateFilter=Date Filter
@@ -249,6 +250,8 @@ CommonN=N
CommonNA=N/A
CommonName=Name
CommonNew=New
+CommonNewPassword=New Password
+CommonNewPasswordVerify=New Password Verify
CommonNewSelection=New Selection
CommonNewUser=New User
CommonNext=Next
diff --git a/framework/common/servicedef/services.xml b/framework/common/servicedef/services.xml
index a095a2f2b1..50708f76eb 100644
--- a/framework/common/servicedef/services.xml
+++ b/framework/common/servicedef/services.xml
@@ -365,6 +365,7 @@ under the License.
+
diff --git a/framework/common/src/org/ofbiz/common/login/LoginServices.java b/framework/common/src/org/ofbiz/common/login/LoginServices.java
index 3cfdf16531..f3dd5042b6 100644
--- a/framework/common/src/org/ofbiz/common/login/LoginServices.java
+++ b/framework/common/src/org/ofbiz/common/login/LoginServices.java
@@ -362,6 +362,7 @@ public class LoginServices {
String currentPasswordVerify = (String) context.get("currentPasswordVerify");
String enabled = (String) context.get("enabled");
String passwordHint = (String) context.get("passwordHint");
+ String requirePasswordChange = (String) context.get("requirePasswordChange");
String errMsg = null;
// security: don't create a user login if the specified partyId (if not empty) already exists
@@ -397,6 +398,7 @@ public class LoginServices {
GenericValue userLoginToCreate = delegator.makeValue("UserLogin", UtilMisc.toMap("userLoginId", userLoginId));
userLoginToCreate.set("passwordHint", passwordHint);
userLoginToCreate.set("enabled", enabled);
+ userLoginToCreate.set("requirePasswordChange", requirePasswordChange);
userLoginToCreate.set("partyId", partyId);
userLoginToCreate.set("currentPassword", useEncryption ? getPasswordHash(currentPassword) : currentPassword);
@@ -503,6 +505,7 @@ public class LoginServices {
userLoginToUpdate.set("currentPassword", useEncryption ? getPasswordHash(newPassword) : newPassword, false);
userLoginToUpdate.set("passwordHint", passwordHint, false);
+ userLoginToUpdate.set("requirePasswordChange", "N");
try {
userLoginToUpdate.store();
diff --git a/framework/common/webcommon/changePassword.ftl b/framework/common/webcommon/changePassword.ftl
new file mode 100644
index 0000000000..0e727a2793
--- /dev/null
+++ b/framework/common/webcommon/changePassword.ftl
@@ -0,0 +1,59 @@
+<#--
+Licensed to the Apache Software Foundation (ASF) under one
+or more contributor license agreements. See the NOTICE file
+distributed with this work for additional information
+regarding copyright ownership. The ASF licenses this file
+to you under the Apache License, Version 2.0 (the
+"License"); you may not use this file except in compliance
+with the License. You may obtain a copy of the License at
+
+http://www.apache.org/licenses/LICENSE-2.0
+
+Unless required by applicable law or agreed to in writing,
+software distributed under the License is distributed on an
+"AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
+KIND, either express or implied. See the License for the
+specific language governing permissions and limitations
+under the License.
+-->
+
+<#assign username = requestParameters.USERNAME?default((sessionAttributes.autoUserLogin.userLoginId)?default(""))>
+
+