Commit 6ab2ed8a authored by Cédric Le Ninivin's avatar Cédric Le Ninivin

erp5_credential: fix ERP5Site_newCredentialRecovery to use ERP5 Login

parent 6ee39f47
......@@ -92,15 +92,18 @@ if default_email_text is not None:\n
else:\n
# Case for recovery of password\n
if person_list is None:\n
person_module = portal.getDefaultModule(\'Person\')\n
result = person_module.searchFolder(reference={\'query\':reference, \'key\':\'ExactMatch\'})\n
result = portal.portal_catalog(\n
portal_type=("ERP5 Login"),\n
parent_portal_type="Person",\n
reference={\'query\':reference, \'key\':\'ExactMatch\'},\n
)\n
if len(result) != 1:\n
portal_status_message = portal.Base_translateString("Can\'t find corresponding person, it\'s not possible to recover your credentials.")\n
if web_site is not None:\n
return web_site.Base_redirect(\'\', keep_items = dict(portal_status_message=portal_status_message ))\n
return portal.Base_redirect(\'\', keep_items = dict(portal_status_message=portal_status_message ))\n
\n
person_list = [result[0].getObject(),]\n
person_list = [result[0].getObject().getParentValue(),]\n
\n
# Check the response\n
person = person_list[0]\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