summaryrefslogtreecommitdiff
path: root/service
diff options
context:
space:
mode:
authorTulio Casagrande <tcasagra@thoughtworks.com>2017-04-12 13:44:19 -0300
committerTulio Casagrande <tcasagra@thoughtworks.com>2017-04-12 13:44:19 -0300
commiteb811d8d5d767be45038806e0effdd63510bda3a (patch)
treed0058ae28458da1723923d91757579a723442b96 /service
parent40c992ce12271f0f71839746dc2893e187a909a1 (diff)
[#927] Log account recovery steps
with @deniscostadsc
Diffstat (limited to 'service')
-rw-r--r--service/pixelated/account_recovery.py4
1 files changed, 4 insertions, 0 deletions
diff --git a/service/pixelated/account_recovery.py b/service/pixelated/account_recovery.py
index 13313996..2208faf5 100644
--- a/service/pixelated/account_recovery.py
+++ b/service/pixelated/account_recovery.py
@@ -34,6 +34,8 @@ class AccountRecovery(object):
@inlineCallbacks
def update_recovery_code(self):
+ log.info('Updating user\'s recovery code')
+
try:
code = self._soledad.create_recovery_code()
response = yield self._bonafide_session.update_recovery_code(code)
@@ -48,6 +50,8 @@ class AccountRecovery(object):
@inlineCallbacks
def _send_mail(self, code, backup_email):
+ log.info('Sending mail containing the user\'s recovery code')
+
sender = 'team@{}'.format(self._domain)
msg = MIMEText('Your code %s' % code)
msg['Subject'] = 'Recovery Code'