You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@ofbiz.apache.org by as...@apache.org on 2010/09/13 16:54:38 UTC

svn commit: r996563 - /ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Author: ashish
Date: Mon Sep 13 14:54:37 2010
New Revision: 996563

URL: http://svn.apache.org/viewvc?rev=996563&view=rev
Log:
When I enter values in "New Password" and "Verify Password" fields without entering value in "Current Password" field then system is accepting new password without any error.

Correct flow should be : System should ask user to enter "Current Password". 
Thanks Amit for the contribution. 

Modified:
    ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml

Modified: ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml
URL: http://svn.apache.org/viewvc/ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml?rev=996563&r1=996562&r2=996563&view=diff
==============================================================================
--- ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml (original)
+++ ofbiz/trunk/specialpurpose/ecommerce/script/org/ofbiz/ecommerce/customer/CustomerEvents.xml Mon Sep 13 14:54:37 2010
@@ -913,21 +913,30 @@ under the License.
             </call-bsh>
             <set field="parameters.userLogin" from-field="userLogin"/>
         <else>
-            <if-not-empty field="parameters.currentPassword">
-                <call-map-processor xml-resource="component://securityext/script/org/ofbiz/securityext/login/LoginMapProcs.xml"
-                    processor-name="updatePassword" in-map-name="parameters" out-map-name="passwordMap"/>
-                <check-errors/>
-                <set-service-fields service-name="updatePassword" map="passwordMap" to-map="passwordCtx"/>
-                <call-service service-name="updatePassword" in-map-name="passwordCtx">
-                    <result-to-field result-name="updatedUserLogin"/>
-                </call-service>
-                <set-current-user-login value-field="updatedUserLogin"/>
-                <session-to-field field="userLogin"/>
-                <if-compare field="userLogin.userLoginId" operator="equals" value="${updatedUserLogin.userLoginId}">
-                    <field-to-session field="updatedUserLogin" session-name="userLogin"/>
-                </if-compare>
-                <session-to-field field="userLogin"/>
-            </if-not-empty>
+            <if>
+                <condition>
+                    <or>
+                        <not><if-empty field="parameters.currentPassword"></if-empty></not>
+                        <not><if-empty field="parameters.newPassword"></if-empty></not>
+                        <not><if-empty field="parameters.newPasswordVerify"> </if-empty></not>
+                    </or>
+                </condition>
+                <then>
+                    <call-map-processor xml-resource="component://securityext/script/org/ofbiz/securityext/login/LoginMapProcs.xml"
+                        processor-name="updatePassword" in-map-name="parameters" out-map-name="passwordMap"/>
+                    <check-errors/>
+                    <set-service-fields service-name="updatePassword" map="passwordMap" to-map="passwordCtx"/>
+                    <call-service service-name="updatePassword" in-map-name="passwordCtx">
+                        <result-to-field result-name="updatedUserLogin"/>
+                    </call-service>
+                    <set-current-user-login value-field="updatedUserLogin"/>
+                    <session-to-field field="userLogin"/>
+                    <if-compare field="userLogin.userLoginId" operator="equals" value="${updatedUserLogin.userLoginId}">
+                        <field-to-session field="updatedUserLogin" session-name="userLogin"/>
+                    </if-compare>
+                    <session-to-field field="userLogin"/>
+              </then>
+           </if>
         </else>
         </if-empty>
     </simple-method>