diff --git a/auth/pipeline.py b/auth/pipeline.py index 8895810..494913f 100644 --- a/auth/pipeline.py +++ b/auth/pipeline.py @@ -1,8 +1,13 @@ from social_core.pipeline.social_auth import associate_by_email +from django.contrib.auth.models import Group def staff_me_up(backend, details, response, uid, user, *args, **kwargs): user.is_staff = True + try: + user.groups.set([Group.objects.get(name='member')]) + except Group.DoesNotExist: + pass user.save()