Adding logging for emails sent. Also using history.replaceState to clear the ?next= parameter.

This commit is contained in:
Samuel Clay 2011-09-23 18:13:16 -07:00
parent f29266d707
commit 16b1ab6f9c
2 changed files with 10 additions and 0 deletions

View file

@ -117,6 +117,8 @@ NewsBlur""" % {'user': self.user.username, 'feeds': subs.count()}
to=['%s <%s>' % (user, user.email)])
msg.attach_alternative(html, "text/html")
msg.send()
logging.user(self.user, "~BB~FM~SBSending email for new user: %s" % self.user.email)
def send_new_premium_email(self):
if not self.user.email or not self.send_emails:
@ -131,6 +133,8 @@ NewsBlur""" % {'user': self.user.username, 'feeds': subs.count()}
to=['%s <%s>' % (user, user.email)])
msg.attach_alternative(html, "text/html")
msg.send()
logging.user(self.user, "~BB~FM~SBSending email for new premium: %s" % self.user.email)
def send_forgot_password_email(self, email=None):
if not self.user.email and not email:
@ -154,6 +158,8 @@ NewsBlur""" % {'user': self.user.username, 'feeds': subs.count()}
user.set_password('')
user.save()
logging.user(self.user, "~BB~FM~SBSending email for forgotten password: %s" % self.user.email)
def autologin_url(self, next=None):
return reverse('autologin', kwargs={
'username': self.user.username,

View file

@ -318,6 +318,10 @@
} else if (next == 'password') {
this.open_account_modal({'change_password': true});
}
if (window.history.replaceState) {
window.history.replaceState({}, null, '/');
}
},
animate_progress_bar: function($bar, seconds, percentage) {