109526520: Implement verify flow

When a person registers with a valid mobile number and email address,
a code will be sent to each. That person can enter the verify codes and continue to the add-service page.
This commit is contained in:
Rebecca Law
2015-12-07 16:08:30 +00:00
parent 56db1ad400
commit 16618e80f9
8 changed files with 122 additions and 22 deletions

View File

@@ -30,3 +30,10 @@ def increment_failed_login_count(id):
user = User.query.filter_by(id=id).first()
user.failed_login_count += 1
db.session.commit()
def activate_user(id):
user = get_user_by_id(id)
user.state = 'active'
db.session.add(user)
db.session.commit()