aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/users.py
diff options
context:
space:
mode:
authorElrond <elrond+mediagoblin.org@samba-tng.org>2011-11-14 18:49:21 +0100
committerElrond <elrond+mediagoblin.org@samba-tng.org>2011-12-05 21:08:57 +0100
commit9047b254f340c16f33183f0d6d68e6c4a5a3c8de (patch)
tree7cbbd7836840e356681f02a41a067a8cb5ea7ded /mediagoblin/gmg_commands/users.py
parent809cbfc5ab3c999f357c0b4e7b6c89e8a36dc6d2 (diff)
downloadmediagoblin-9047b254f340c16f33183f0d6d68e6c4a5a3c8de.tar.lz
mediagoblin-9047b254f340c16f33183f0d6d68e6c4a5a3c8de.tar.xz
mediagoblin-9047b254f340c16f33183f0d6d68e6c4a5a3c8de.zip
Dot-Notation for Users.pw_hash
Diffstat (limited to 'mediagoblin/gmg_commands/users.py')
-rw-r--r--mediagoblin/gmg_commands/users.py4
1 files changed, 2 insertions, 2 deletions
diff --git a/mediagoblin/gmg_commands/users.py b/mediagoblin/gmg_commands/users.py
index 04d88e23..6084f9d7 100644
--- a/mediagoblin/gmg_commands/users.py
+++ b/mediagoblin/gmg_commands/users.py
@@ -52,7 +52,7 @@ def adduser(args):
entry = db.User()
entry.username = unicode(args.username.lower())
entry.email = unicode(args.email)
- entry['pw_hash'] = auth_lib.bcrypt_gen_password_hash(args.password)
+ entry.pw_hash = auth_lib.bcrypt_gen_password_hash(args.password)
entry['status'] = u'active'
entry['email_verified'] = True
entry.save(validate=True)
@@ -96,7 +96,7 @@ def changepw(args):
user = db.User.one({'username': unicode(args.username.lower())})
if user:
- user['pw_hash'] = auth_lib.bcrypt_gen_password_hash(args.password)
+ user.pw_hash = auth_lib.bcrypt_gen_password_hash(args.password)
user.save()
print 'Password successfully changed'
else: