Commit e6bdf21b authored by Daniel W Bond's avatar Daniel W Bond
Browse files

added cas callback for user creation

parent 9d0a93be
from django.contrib.auth.models import User
from django.conf import settings
def create_user(tree):
username = tree[0][0].text
user, user_created = User.objects.get_or_create(username=username)
if user_created: = "%s@%s" % (username, settings.ORGANIZATION_EMAIL_DOMAIN)
new_student = Student.objects.create()
new_student.user = user
print("Created user %s!" % username)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment