diff --git a/apps/users/signal_handlers.py b/apps/users/signal_handlers.py index 27c629efc..ae3117ef3 100644 --- a/apps/users/signal_handlers.py +++ b/apps/users/signal_handlers.py @@ -52,6 +52,8 @@ def user_authenticated_handle(user, created, source, attrs=None, **kwargs): if created: user.source = source user.save() + + if created and isinstance(attrs, dict): org_ids = bind_user_to_org_role(user) group_names = attrs.get('groups') bind_user_to_group(org_ids, group_names, user)