Add receipt/invoice email support and option to Quay

This commit is contained in:
Joseph Schorr 2013-11-15 14:42:31 -05:00
parent 318dc79de3
commit 457b619647
14 changed files with 310 additions and 32 deletions

View file

@ -296,6 +296,12 @@ def get_user(username):
return None
def get_user_or_org_by_customer_id(customer_id):
try:
return User.get(User.stripe_id == customer_id)
except User.DoesNotExist:
return None
def get_matching_teams(team_prefix, organization):
query = Team.select().where(Team.name ** (team_prefix + '%'),
Team.organization == organization)
@ -491,6 +497,11 @@ def change_password(user, new_password):
user.save()
def change_invoice_email(user, invoice_email):
user.invoice_email = invoice_email
user.save()
def update_email(user, new_email):
user.email = new_email
user.verified = False