When user ask to reset his password, if the associated person hasn't a...

When user ask to reset his password, if the associated person hasn't a recovery password question we should send the mail and not ask a response (to an empty question)

git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@45284 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 54867ca7
......@@ -65,9 +65,16 @@ if len(result) != 1:\n
return context.Base_redirect(\'login_form\', keep_items = dict(portal_status_message=portal_status_message ))\n
\n
person = result[0]\n
\n
#If any question, we can create directly the credential recovery\n
question_free_text = person.getDefaultCredentialQuestionQuestionFreeText()\n
question_title = person.getDefaultCredentialQuestionQuestionTitle()\n
if not (question_free_text or question_title):\n
return context.ERP5Site_newCredentialRecovery(reference=reference)\n
\n
return context.Base_redirect(\'ERP5Site_newCredentialRecoveryDialog\', keep_items = \\\n
dict(default_credential_question_question_free_text=person.getDefaultCredentialQuestionQuestionFreeText(),\n
default_credential_question_question_title=person.getDefaultCredentialQuestionQuestionTitle(),\n
dict(default_credential_question_question_free_text=question_free_text,\n
default_credential_question_question_title=question_title,\n
reference=reference))\n
</string> </value>
</item>
......
325
\ No newline at end of file
326
\ 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