diff options
author | Rodney Ewing <ewing.rj@gmail.com> | 2013-07-09 10:44:44 -0700 |
---|---|---|
committer | Rodney Ewing <ewing.rj@gmail.com> | 2013-08-15 15:57:59 -0700 |
commit | 517eb8b4433888a3ac11f0ed9efeb30dca68838b (patch) | |
tree | bc505830ec96921383a8ee6f574945bb5e1bf492 /mediagoblin/plugins/ldap/views.py | |
parent | 11782c0061c4c386fc5d8315b33a6d8464e83013 (diff) | |
download | mediagoblin-517eb8b4433888a3ac11f0ed9efeb30dca68838b.tar.lz mediagoblin-517eb8b4433888a3ac11f0ed9efeb30dca68838b.tar.xz mediagoblin-517eb8b4433888a3ac11f0ed9efeb30dca68838b.zip |
- fixed typo with unbinding code
- added the ability to get the user's email from the ldap server upon registration
Diffstat (limited to 'mediagoblin/plugins/ldap/views.py')
-rw-r--r-- | mediagoblin/plugins/ldap/views.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/mediagoblin/plugins/ldap/views.py b/mediagoblin/plugins/ldap/views.py index 217c6d8c..aef1bf56 100644 --- a/mediagoblin/plugins/ldap/views.py +++ b/mediagoblin/plugins/ldap/views.py @@ -31,7 +31,8 @@ def login(request): if request.method == 'POST' and login_form.validate(): l = LDAP() - username = l.login(login_form.username.data, login_form.password.data) + username, email = l.login(login_form.username.data, + login_form.password.data) if username: user = User.query.filter_by( @@ -55,8 +56,8 @@ def login(request): 'instance.')) return redirect(request, 'index') - register_form = forms.RegisterForm(request.form, - username=username) + register_form = forms.RegisterForm(username=username, + email=email) return render_to_response( request, |