Commit 522bd980 authored by Xiaowu Zhang's avatar Xiaowu Zhang

erp5_web_renderjs_ui: avoid raise error when change password

not user friendly
parent a420cf43
""" """
The method changeUserPassword ignore came_from if you are in the Web Site context. The method changeUserPassword ignore came_from if you are in the Web Site context.
""" """
REQUEST = context.REQUEST
error_list = context.portal_password.analyzePassword(
REQUEST['password'], REQUEST['password_key']
)
if error_list:
error_message = context.Base_translateString("Password don't comply with policy: ")
error_message += ", ".join([context.Base_translateString(i.message) for i in error_list])
return REQUEST.RESPONSE.redirect(
"%s/WebSite_viewResetPassword?reset_key=%s&portal_status_message=%s" % \
(REQUEST["came_from"], REQUEST['password_key'], error_message))
REQUEST = context.REQUEST REQUEST = context.REQUEST
next_url = context.portal_password.changeUserPassword(password=REQUEST['password'], next_url = context.portal_password.changeUserPassword(password=REQUEST['password'],
password_confirmation=REQUEST['password_confirm'], password_confirmation=REQUEST['password_confirm'],
......
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