Commit 283416a4 authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_credential: Fix Update Credential Cookie on Credential Update for ERP5 Login

parent a5978e11
...@@ -75,6 +75,7 @@ if context.getPassword():\n ...@@ -75,6 +75,7 @@ if context.getPassword():\n
(person.getRelativeUrl(), reference)\n (person.getRelativeUrl(), reference)\n
login.setEncodedPassword(context.getPassword())\n login.setEncodedPassword(context.getPassword())\n
context.portal_caches.clearCache((\'erp5_content_short\',))\n context.portal_caches.clearCache((\'erp5_content_short\',))\n
return login.getReference()\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -98,9 +98,13 @@ else:\n ...@@ -98,9 +98,13 @@ else:\n
username = person.getReference()\n username = person.getReference()\n
if password and username == str(portal.portal_membership.getAuthenticatedMember()):\n if password and username == str(portal.portal_membership.getAuthenticatedMember()):\n
# The password is updated synchronously and the the rest of the credential Update is done later\n # The password is updated synchronously and the the rest of the credential Update is done later\n
credential_update.Credential_updatePersonPassword()\n login_reference = credential_update.Credential_updatePersonPassword()\n
portal.cookie_authentication.credentialsChanged(username, username, password)\n
portal_status_message = "Password changed."\n portal_status_message = "Password changed."\n
context.getPortalObject().cookie_authentication.credentialsChanged(\n
username,\n
login_reference,\n
password,\n
)\n
\n \n
portal_status_message = context.Base_translateString(portal_status_message)\n portal_status_message = context.Base_translateString(portal_status_message)\n
return portal.Base_redirect(keep_items = {\'portal_status_message\': portal_status_message})\n return portal.Base_redirect(keep_items = {\'portal_status_message\': portal_status_message})\n
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment