diff --git a/bitpoll/base/openid.py b/bitpoll/base/openid.py index a068976..e5502e8 100644 --- a/bitpoll/base/openid.py +++ b/bitpoll/base/openid.py @@ -30,6 +30,10 @@ def handle_federated_userinfo(self, user_data): def automap_user_attrs(self, user, user_data): super().automap_user_attrs(user, user_data) + if hasattr(user_data, "display_name"): + user.displayname = user_data.display_name + user.save() + groups = getattr(user_data, "groups", []) for group_name in groups: group = Group.objects.get_or_create(name=group_name)[0]