108536490: Update encryption for password

This commit is contained in:
Rebecca Law
2015-11-30 15:33:40 +00:00
parent 3f017b30f2
commit ff9e98907e
6 changed files with 27 additions and 16 deletions

View File

@@ -1,6 +1,6 @@
from app import db, login_manager
from app.models import User
from app.main.encryption import encrypt
from app.main.encryption import hashpw
@login_manager.user_loader
@@ -9,7 +9,7 @@ def load_user(user_id):
def insert_user(user):
user.password = encrypt(user.password)
user.password = hashpw(user.password)
db.session.add(user)
db.session.commit()