Commit 60a5b8e5 by ichuang

update User creation - don't use get_or_create without email

parent 9a891b51
......@@ -131,8 +131,10 @@ class CASBackend(object):
if not username:
return None
user, created = User.objects.get_or_create(username=username)
if created:
try:
user = User.objects.get(username=username)
except User.DoesNotExist:
user = User(username=username, email=username)
user.set_unusable_password()
if authentication_response and _CAS_USER_DETAILS_RESOLVER:
......
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