projects
/
Plinn.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ad86541
)
Suite de l'implémentation de la réinitialisation de mot de passe.
author
Benoît Pin
<pin@cri.ensmp.fr>
Tue, 30 Jul 2013 13:27:38 +0000
(15:27 +0200)
committer
Benoît Pin
<pin@cri.ensmp.fr>
Tue, 30 Jul 2013 13:27:38 +0000
(15:27 +0200)
RegistrationTool.py
patch
|
blob
|
history
diff --git
a/RegistrationTool.py
b/RegistrationTool.py
index
85133ff
..
953e008
100644
(file)
--- a/
RegistrationTool.py
+++ b/
RegistrationTool.py
@@
-196,10
+196,17
@@
class RegistrationTool(BaseRegistrationTool) :
""" add uuid / (userid, expiration) pair and return uuid """
self.clearExpiredPasswordResetRequests()
mtool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IMembershipTool')
""" add uuid / (userid, expiration) pair and return uuid """
self.clearExpiredPasswordResetRequests()
mtool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IMembershipTool')
- if mtool.getMemberById(userid) :
+ member = mtool.getMemberById(userid)
+ if member :
uuid = str(uuid4())
self._passwordResetRequests[uuid] = (userid, DateTime() + 1)
uuid = str(uuid4())
self._passwordResetRequests[uuid] = (userid, DateTime() + 1)
- return uuid
+ mailhost = getUtilityByInterfaceName('Products.MailHost.interfaces.IMailHost')
+ ptool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IPropertiesTool')
+ utool = getUtilityByInterfaceName('Products.CMFCore.interfaces.IURLTool')
+ sender = ptool.getProperty('email_from_address')
+ to = member.getProperty('email')
+ message = self.echange_mail_template(From=sender,
+ To=to)
security.declarePrivate('clearExpiredPasswordResetRequests')
def clearExpiredPasswordResetRequests(self):
security.declarePrivate('clearExpiredPasswordResetRequests')
def clearExpiredPasswordResetRequests(self):