Dot-Notation for Users.pw_hash

This commit is contained in:
Elrond
2011-11-14 18:49:21 +01:00
parent 809cbfc5ab
commit 9047b254f3
4 changed files with 6 additions and 6 deletions

View File

@@ -82,7 +82,7 @@ def register(request):
user = request.db.User()
user.username = username
user.email = email
user['pw_hash'] = auth_lib.bcrypt_gen_password_hash(
user.pw_hash = auth_lib.bcrypt_gen_password_hash(
request.POST['password'])
user.save(validate=True)
@@ -309,7 +309,7 @@ def verify_forgot_password(request):
cp_form = auth_forms.ChangePassForm(formdata_vars)
if request.method == 'POST' and cp_form.validate():
user[u'pw_hash'] = auth_lib.bcrypt_gen_password_hash(
user.pw_hash = auth_lib.bcrypt_gen_password_hash(
request.POST['password'])
user[u'fp_verification_key'] = None
user[u'fp_token_expire'] = None