aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/auth/views.py
diff options
context:
space:
mode:
Diffstat (limited to 'mediagoblin/auth/views.py')
-rw-r--r--mediagoblin/auth/views.py5
1 files changed, 3 insertions, 2 deletions
diff --git a/mediagoblin/auth/views.py b/mediagoblin/auth/views.py
index e18469b9..71a5f379 100644
--- a/mediagoblin/auth/views.py
+++ b/mediagoblin/auth/views.py
@@ -120,7 +120,7 @@ def login(request):
login_failed = False
if request.method == 'POST' and login_form.validate():
- user = request.db.User.one(
+ user = request.db.User.find_one(
{'username': request.POST['username'].lower()})
if user and user.check_login(request.POST['password']):
@@ -236,7 +236,8 @@ def forgot_password(request):
Sends an email with an url to renew forgotten password
"""
- fp_form = auth_forms.ForgotPassForm(request.POST)
+ fp_form = auth_forms.ForgotPassForm(request.POST,
+ username=request.GET.get('username'))
if request.method == 'POST' and fp_form.validate():