logging confirmation links for debug purposes

This commit is contained in:
b3yond 2018-09-09 14:57:40 +02:00
parent 185014a452
commit 40c834020a
2 changed files with 7 additions and 7 deletions

View file

@ -39,13 +39,13 @@ def register_post():
return dict(error='Email address already in use.') return dict(error='Email address already in use.')
# send confirmation mail # send confirmation mail
try: try:
print(url('confirm/' + city + '/%s' % db.user_token(email, password))) # only for local testing link = url('confirm/' + city + '/%s' % db.user_token(email, password))
print(link) # only for local testing
logger.info('confirmation link to ' + email + ": " + link)
sendmail( sendmail(
email, email,
"Confirm your account", "Confirm your account",
"Complete your registration here: %s" % ( "Complete your registration here: %s" % (link)
url('confirm/' + city + '/%s' % db.user_token(email, password))
)
) )
return dict(info='Confirmation mail sent.') return dict(info='Confirmation mail sent.')
except Exception: except Exception: