Commit b1ca8603 authored by Lukas Burgey's avatar Lukas Burgey
Browse files

Apply email, first, and last name to the models.User instances

parent 50a9d56a
......@@ -224,8 +224,14 @@ class User(AbstractUser):
def update_userinfo(self, userinfo):
if 'sub' not in userinfo:
raise Exception('Missing attribute in userinfo: sub')
if 'email' in userinfo: = userinfo['email']
if 'family_name' in userinfo:
self.last_name = userinfo['family_name']
if 'given_name' in userinfo:
self.first_name = userinfo['given_name']
self.userinfo = userinfo
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