summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorNico von Geyso <Nico.Geyso@FU-Berlin.de>2013-06-02 19:46:52 +0200
committerNico von Geyso <Nico.Geyso@FU-Berlin.de>2013-06-02 19:46:52 +0200
commit653a7d24828e783a3964b3f81c7816a17ef8fa45 (patch)
tree3b6403ede6b3df1db553a50d5d953320696863c9
parent1997399fd33c00348860a63529a9a8978e307a96 (diff)
downloadaskbot-master.tar.gz
askbot-master.tar.bz2
askbot-master.zip
Added: UserAssociation for LDAPHEADmaster
-rw-r--r--askbot/management/commands/osqa_migrate.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/askbot/management/commands/osqa_migrate.py b/askbot/management/commands/osqa_migrate.py
index 6952dcc8..06260633 100644
--- a/askbot/management/commands/osqa_migrate.py
+++ b/askbot/management/commands/osqa_migrate.py
@@ -6,6 +6,7 @@ import dateutil
from pprint import pprint
from itertools import groupby
from askbot.conf import settings as askbot_settings
+import askbot.deps.django_authopenid.models as askbot_openid
from django.core.management.base import BaseCommand, CommandError
from django.db.utils import IntegrityError
from django.core.exceptions import ValidationError
@@ -78,6 +79,13 @@ class Command(BaseCommand):
print("Creating User: %s...\t" % user.username),
try:
user.save()
+
+ u_openid = askbot_openid.UserAssociation()
+ u_openid.provider_name = 'ldap'
+ u_openid.openid_url = "%s@ldap" % user.username
+ u_openid.user = user
+ u_openid.save()
+
print("success")
except IntegrityError:
print('error')