Rajoute le nom complet

This commit is contained in:
Tom Hubrecht 2020-12-23 18:04:39 +01:00
parent 40762af938
commit b44f150cf9
4 changed files with 26 additions and 2 deletions

View file

@ -37,6 +37,7 @@ class ENSCASBackend:
"""
email = attributes.get("email")
name = attributes.get("name")
try:
user = UserModel.objects.get(username=cas_login)
@ -44,7 +45,9 @@ class ENSCASBackend:
user = None
if user is None:
user = UserModel.objects.create_user(username=cas_login, email=email)
user = UserModel.objects.create_user(
username=cas_login, email=email, full_name=name
)
return user
# Django boilerplate.