From dc1cd0349575279d16cc0a714770a1ec01e4b6fa Mon Sep 17 00:00:00 2001
From: =?UTF-8?q?C=C3=A9dric=20Le=20Ninivin?= <cedric.leninivin@tiolive.com>
Date: Mon, 18 Jan 2016 16:59:53 +0000
Subject: [PATCH] erp5_credential: Do not accept Credential Update
 Synchronously when password is included

The presence of the password in the Credential Update should not change the processing workflow
of the Credential Update. For Now we just update the password and leave to rest to normal process
---
 .../erp5_credential/ERP5Site_newPersonCredentialUpdate.xml     | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newPersonCredentialUpdate.xml b/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newPersonCredentialUpdate.xml
index cb8017c373..60be8b1b41 100644
--- a/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newPersonCredentialUpdate.xml
+++ b/bt5/erp5_credential/SkinTemplateItem/portal_skins/erp5_credential/ERP5Site_newPersonCredentialUpdate.xml
@@ -97,7 +97,8 @@ else:\n
   # within same transaction and update client side credentials cookie \n
   username = person.getReference()\n
   if password and username == str(portal.portal_membership.getAuthenticatedMember()):\n
-    credential_update.accept()\n
+    # The password is updated synchronously and the the rest of the credential Update is done later\n
+    credential_update.Credential_updatePersonPassword()\n
     portal.cookie_authentication.credentialsChanged(username, username, password)\n
     portal_status_message = "Password changed."\n
 \n
-- 
GitLab