projects
/
Plinn.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Implémentation complète (mais minimale) de la réinitialisation de mot de passe.
[Plinn.git]
/
RegistrationTool.py
diff --git
a/RegistrationTool.py
b/RegistrationTool.py
index
c35cb6a
..
b46a13b
100644
(file)
--- a/
RegistrationTool.py
+++ b/
RegistrationTool.py
@@
-234,16
+234,13
@@
class RegistrationTool(BaseRegistrationTool) :
security.declarePublic('resetPassword')
security.declarePublic('resetPassword')
- def resetPassword(self, u
serid, u
uid, password, confirm) :
+ def resetPassword(self, uuid, password, confirm) :
record = self._passwordResetRequests.get(uuid)
if not record :
return _('Invalid reset password request.')
record = self._passwordResetRequests.get(uuid)
if not record :
return _('Invalid reset password request.')
- recUserid, expiration = record
-
- if recUserid != userid :
- return _('Invalid userid.')
-
+ userid, expiration = record
+ now = DateTime()
if expiration < now :
self.clearExpiredPasswordResetRequests()
return _('Your reset password request has expired. You can ask a new one.')
if expiration < now :
self.clearExpiredPasswordResetRequests()
return _('Your reset password request has expired. You can ask a new one.')