Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
erp5
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Eteri
erp5
Commits
ee9e4ba2
Commit
ee9e4ba2
authored
Aug 31, 2011
by
Aurel
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
user_login is no longer mandatory, it now depends on site configuration
parent
1a19ea70
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
4 deletions
+4
-4
product/ERP5/Tool/PasswordTool.py
product/ERP5/Tool/PasswordTool.py
+4
-4
No files found.
product/ERP5/Tool/PasswordTool.py
View file @
ee9e4ba2
...
...
@@ -255,8 +255,8 @@ class PasswordTool(BaseTool):
self
.
_password_request_dict
.
pop
(
key
)
def
changeUserPassword
(
self
,
user_login
,
password
,
password_confirmation
,
password_key
,
REQUEST
=
None
):
def
changeUserPassword
(
self
,
password
,
password_confirmation
,
password_key
,
user_login
=
None
,
REQUEST
=
None
):
"""
Reset the password for a given login
"""
...
...
@@ -275,7 +275,7 @@ class PasswordTool(BaseTool):
site_url
=
self
.
getWebSiteValue
().
absolute_url
()
if
register_user_login
is
None
:
msg
=
"Key not known. Please ask reset password."
elif
register_user_login
!=
user_login
:
elif
user_login
is
not
None
and
register_user_login
!=
user_login
:
msg
=
translateString
(
"Bad login provided."
)
elif
current_date
>
expiration_date
:
msg
=
translateString
(
"Date has expire."
)
...
...
@@ -293,7 +293,7 @@ class PasswordTool(BaseTool):
# all is OK, change password and remove it from request dict
self
.
_password_request_dict
.
pop
(
password_key
)
persons
=
self
.
getPortalObject
().
acl_users
.
erp5_users
.
getUserByLogin
(
user_login
)
persons
=
self
.
getPortalObject
().
acl_users
.
erp5_users
.
getUserByLogin
(
register_
user_login
)
person
=
persons
[
0
]
person
.
_forceSetPassword
(
password
)
person
.
reindexObject
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment