Fix bug with password reset during donation

master
Drew DeVault 10 years ago
parent 04f0a617c2
commit 86ca065ab3
  1. 6
      fosspay/blueprints/html.py

@ -123,11 +123,9 @@ def donate():
if not user: if not user:
new_account = True new_account = True
user = User(email, binascii.b2a_hex(os.urandom(20)).decode("utf-8")) user = User(email, binascii.b2a_hex(os.urandom(20)).decode("utf-8"))
user.passwordReset = binascii.b2a_hex(os.urandom(20)).decode("utf-8") user.password_reset = binascii.b2a_hex(os.urandom(20)).decode("utf-8")
user.passwordResetExpiry = datetime.now() + timedelta(days=1) user.password_reset_expires = datetime.now() + timedelta(days=1)
print(stripe_token)
customer = stripe.Customer.create(email=user.email, card=stripe_token) customer = stripe.Customer.create(email=user.email, card=stripe_token)
print(customer)
user.stripe_customer = customer.id user.stripe_customer = customer.id
db.add(user) db.add(user)

Loading…
Cancel
Save