Commit 05b7ab54 authored by Nicolas Delaby's avatar Nicolas Delaby

change argument name which can be catch by portal_catalog if

a listbox is displayed in the same rendering then lead to failed.


git-svn-id: https://svn.erp5.org/repos/public/erp5/trunk@24335 20353a03-c40f-0410-a6d1-a30d3c3de9de
parent 7714f762
...@@ -86,7 +86,7 @@ class PasswordTool(BaseTool): ...@@ -86,7 +86,7 @@ class PasswordTool(BaseTool):
user = user_list[0].getObject() user = user_list[0].getObject()
# generate a ramdom string # generate a ramdom string
random_url = self._generateUUID() random_url = self._generateUUID()
url = "%s/portal_password/resetPassword?key=%s" %(self.getPortalObject().absolute_url() , random_url) url = "%s/portal_password/resetPassword?reset_key=%s" %(self.getPortalObject().absolute_url() , random_url)
# generate expiration date # generate expiration date
expiration_date = DateTime() + self._expiration_day expiration_date = DateTime() + self._expiration_day
# register request # register request
...@@ -128,13 +128,13 @@ class PasswordTool(BaseTool): ...@@ -128,13 +128,13 @@ class PasswordTool(BaseTool):
return data return data
def resetPassword(self, key=None, REQUEST=None): def resetPassword(self, reset_key=None, REQUEST=None):
""" """
""" """
if REQUEST is None: if REQUEST is None:
REQUEST = get_request() REQUEST = get_request()
user_login, expiration_date = self.password_request_dict.get(key, (None, None)) user_login, expiration_date = self.password_request_dict.get(reset_key, (None, None))
if key is None or user_login is None: if reset_key is None or user_login is None:
ret_url = '%s/login_form' % self.getPortalObject().absolute_url() ret_url = '%s/login_form' % self.getPortalObject().absolute_url()
return REQUEST.RESPONSE.redirect( ret_url ) return REQUEST.RESPONSE.redirect( ret_url )
...@@ -147,7 +147,7 @@ class PasswordTool(BaseTool): ...@@ -147,7 +147,7 @@ class PasswordTool(BaseTool):
return REQUEST.RESPONSE.redirect( ret_url ) return REQUEST.RESPONSE.redirect( ret_url )
# redirect to form as all is ok # redirect to form as all is ok
REQUEST.set("password_key", key) REQUEST.set("password_key", reset_key)
return self.reset_password_form(REQUEST=REQUEST) return self.reset_password_form(REQUEST=REQUEST)
......
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