From 1a46a54b3ab28801fc9941fbb3b5fbd79bb3843a Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Tue, 10 Jul 2012 18:22:23 -0400 Subject: smal fix to the ldap procedure --- askbot/conf/ldap.py | 1 + askbot/deps/django_authopenid/views.py | 3 +-- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/askbot/conf/ldap.py b/askbot/conf/ldap.py index ae916313..30fbcdec 100644 --- a/askbot/conf/ldap.py +++ b/askbot/conf/ldap.py @@ -66,6 +66,7 @@ settings.register( LDAP_SETTINGS, 'LDAP_BASE_DN', description=_('Base DN (distinguished name)'), + default = '', help_text = _( 'Usually base DN mirrors domain name of your organization, ' 'e.g. "dn=example,dn=com" when your site url is "example.com".' diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py index 812fed07..efdb3a16 100644 --- a/askbot/deps/django_authopenid/views.py +++ b/askbot/deps/django_authopenid/views.py @@ -316,15 +316,14 @@ def signin(request): #todo: since django 1.2 there is .exists() user_is_old = (User.objects.filter(username = username).count() > 0) - user = authenticate( username=username, password=password, method = 'ldap' ) if user is not None: - login(request, user) if user_is_old: + login(request, user) return HttpResponseRedirect(next_url) else: return finalize_generic_signin( -- cgit v1.2.3-1-g7c22