aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/gmg_commands/users.py
diff options
context:
space:
mode:
authorRodney Ewing <ewing.rj@gmail.com>2013-05-14 17:38:18 -0700
committerRodney Ewing <ewing.rj@gmail.com>2013-05-24 16:52:48 -0700
commit9c2c9be79d210155f1b8f299d34029afe3a434ed (patch)
treebbf6ebd2c672955e9ed1267433337ebeaa82755d /mediagoblin/gmg_commands/users.py
parentd54cf48a33d16619f94fa3873f88392b4c77a23e (diff)
downloadmediagoblin-9c2c9be79d210155f1b8f299d34029afe3a434ed.tar.lz
mediagoblin-9c2c9be79d210155f1b8f299d34029afe3a434ed.tar.xz
mediagoblin-9c2c9be79d210155f1b8f299d34029afe3a434ed.zip
moved bcrypt_gen_password_hash to basic_auth/tools and added gen_password_hash function to auth/__init__
Diffstat (limited to 'mediagoblin/gmg_commands/users.py')
-rw-r--r--mediagoblin/gmg_commands/users.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/mediagoblin/gmg_commands/users.py b/mediagoblin/gmg_commands/users.py
index 024c8498..1f329459 100644
--- a/mediagoblin/gmg_commands/users.py
+++ b/mediagoblin/gmg_commands/users.py
@@ -15,7 +15,7 @@
# along with this program. If not, see <http://www.gnu.org/licenses/>.
from mediagoblin.gmg_commands import util as commands_util
-from mediagoblin.auth import lib as auth_lib
+from mediagoblin import auth
from mediagoblin import mg_globals
def adduser_parser_setup(subparser):
@@ -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.gen_password_hash(args.password)
entry.status = u'active'
entry.email_verified = True
entry.save()
@@ -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.gen_password_hash(args.password)
user.save()
print 'Password successfully changed'
else: