summaryrefslogtreecommitdiffstats
path: root/askbot/deps
diff options
context:
space:
mode:
authorEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-09-12 15:21:45 -0400
committerEvgeny Fadeev <evgeny.fadeev@gmail.com>2012-09-12 15:21:45 -0400
commit8753a091acea14cd9ca735cb80961c7b3a5a4ef3 (patch)
tree3c8dd75fbd1db110f548275a2d870104c37d27f0 /askbot/deps
parentdd5916bd3fb4ebc9a1f705efc6677946e3556626 (diff)
downloadaskbot-8753a091acea14cd9ca735cb80961c7b3a5a4ef3.tar.gz
askbot-8753a091acea14cd9ca735cb80961c7b3a5a4ef3.tar.bz2
askbot-8753a091acea14cd9ca735cb80961c7b3a5a4ef3.zip
fixed ldap user accounts where django user name is created by the users
Diffstat (limited to 'askbot/deps')
-rw-r--r--askbot/deps/django_authopenid/ldap_auth.py2
-rw-r--r--askbot/deps/django_authopenid/views.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/askbot/deps/django_authopenid/ldap_auth.py b/askbot/deps/django_authopenid/ldap_auth.py
index 5e650714..a633aa3b 100644
--- a/askbot/deps/django_authopenid/ldap_auth.py
+++ b/askbot/deps/django_authopenid/ldap_auth.py
@@ -176,7 +176,7 @@ def ldap_create_user_default(user_info):
"""
# create new user in local db
user = User()
- user.username = user_info['ldap_username']
+ user.username = user_info.get('django_username', user_info['ldap_username'])
user.set_unusable_password()
user.first_name = user_info['first_name']
user.last_name = user_info['last_name']
diff --git a/askbot/deps/django_authopenid/views.py b/askbot/deps/django_authopenid/views.py
index 3132d7ba..73280011 100644
--- a/askbot/deps/django_authopenid/views.py
+++ b/askbot/deps/django_authopenid/views.py
@@ -918,7 +918,7 @@ def register(request, login_provider_name=None, user_identifier=None):
user_info = request.session['ldap_user_info']
#we take this info from the user input where
#they can override the default provided by LDAP
- user_info['ldap_username'] = username
+ user_info['django_username'] = username
user_info['email'] = email
user = ldap_create_user(user_info).user
del request.session['ldap_user_info']