Skip to content

Commit

Permalink
OpenConceptLab/ocl_issues#1338 | OIDBackend | update user
Browse files Browse the repository at this point in the history
  • Loading branch information
snyaggarwal committed Aug 5, 2022
1 parent 101260f commit a33e292
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions core/common/backends.py
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,13 @@ def create_user(self, claims):
)
)

def update_user(self, user, claims):
user.first_name = claims.get('given_name') or user.first_name
user.last_name = claims.get('family_name') or user.last_name
user.email = claims.get('email') or user.email
user.save()
return user

def filter_users_by_claims(self, claims):
from core.users.models import UserProfile

Expand Down

0 comments on commit a33e292

Please sign in to comment.