diff options
author | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-08-28 22:05:54 -0500 |
---|---|---|
committer | Christopher Allan Webber <cwebber@dustycloud.org> | 2011-08-28 22:05:54 -0500 |
commit | 7dc3a66f924c734cbee68677e84f5b656eefe280 (patch) | |
tree | df091eb3589ec2a7ab711acbe137af3c97a583f0 /mediagoblin/auth | |
parent | ad56a4826b987a0fa8f65849d3611f61cc1f50d6 (diff) | |
parent | 46df0297e029c075a2c28b0c31490c560c99158c (diff) | |
download | mediagoblin-7dc3a66f924c734cbee68677e84f5b656eefe280.tar.lz mediagoblin-7dc3a66f924c734cbee68677e84f5b656eefe280.tar.xz mediagoblin-7dc3a66f924c734cbee68677e84f5b656eefe280.zip |
Merge remote branch 'remotes/jwandborg/f403_ability_to_delete'
Conflicts:
mediagoblin/edit/views.py
mediagoblin/templates/mediagoblin/user_pages/media.html
mediagoblin/user_pages/routing.py
Diffstat (limited to 'mediagoblin/auth')
-rw-r--r-- | mediagoblin/auth/views.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py index 4c4a34fd..48c5937c 100644 --- a/mediagoblin/auth/views.py +++ b/mediagoblin/auth/views.py @@ -44,11 +44,12 @@ def register(request): if request.method == 'POST' and register_form.validate(): # TODO: Make sure the user doesn't exist already - + username = unicode(request.POST['username'].lower()) + email = unicode(request.POST['email'].lower()) users_with_username = request.db.User.find( - {'username': request.POST['username'].lower()}).count() + {'username': username}).count() users_with_email = request.db.User.find( - {'email': request.POST['email'].lower()}).count() + {'email': email}).count() extra_validation_passes = True @@ -64,8 +65,8 @@ def register(request): if extra_validation_passes: # Create the user user = request.db.User() - user['username'] = request.POST['username'].lower() - user['email'] = request.POST['email'].lower() + user['username'] = username + user['email'] = email user['pw_hash'] = auth_lib.bcrypt_gen_password_hash( request.POST['password']) user.save(validate=True) |