Try to use notication message to use password recovery.

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45680 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 96a77e5b
...@@ -53,12 +53,18 @@ ...@@ -53,12 +53,18 @@
<value> <string>"""\n <value> <string>"""\n
send the password reset link by mail\n send the password reset link by mail\n
"""\n """\n
portal = context.getPortalObject()\n
\n
person = context.getDestinationDecisionValue(portal_type="Person")\n person = context.getDestinationDecisionValue(portal_type="Person")\n
reference = person.getReference()\n reference = person.getReference()\n
notification_message = portal.NotificationTool_getDocumentValue("crendential_recovery-reset-link",\n
context.getLanguage())\n
\n \n
portal = context.getPortalObject()\n
context.REQUEST.set(\'came_from\', context.getUrlString())\n context.REQUEST.set(\'came_from\', context.getUrlString())\n
portal.portal_password.mailPasswordResetRequest(user_login=reference, REQUEST=context.REQUEST)\n \n
portal.portal_password.mailPasswordResetRequest(user_login=reference, \n
REQUEST=context.REQUEST,\n
notification_message = notification_message)\n
</string> </value> </string> </value>
</item> </item>
<item> <item>
......
...@@ -69,7 +69,8 @@ credential_recovery = module.newContent(\n ...@@ -69,7 +69,8 @@ credential_recovery = module.newContent(\n
\t\tportal_type="Credential Recovery",\n \t\tportal_type="Credential Recovery",\n
reference=reference,\n reference=reference,\n
default_credential_question_answer=default_credential_question_answer,\n default_credential_question_answer=default_credential_question_answer,\n
destination_decision=person.getRelativeUrl())\n destination_decision=person.getRelativeUrl(),\n
language=portal.Localizer.get_selected_language())\n
credential_recovery.submit()\n credential_recovery.submit()\n
\n \n
portal_status_message = context.Base_translateString("Credential Recovery Created.")\n portal_status_message = context.Base_translateString("Credential Recovery Created.")\n
......
327 328
\ No newline at end of file \ No newline at end of file
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