@login_required
@require_http_methods(['POST'])
def make_contributor(request):
    group = Group.objects.get(name=CONTRIBUTOR_GROUP)
    request.user.groups.add(group)

    @email_utils.safe_translation
    def _make_mail(locale):
        mail = email_utils.make_mail(
            # L10n: Thank you so much for your translation work! You're
            # L10n: the best!
            subject=_('Welcome to SUMO!'),
            text_template='users/email/contributor.ltxt',
            html_template='users/email/contributor.html',
            context_vars={'contributor': request.user},
            from_email=settings.DEFAULT_FROM_EMAIL,
            to_email=request.user.email)

        return mail

    email_utils.send_messages([_make_mail(request.LANGUAGE_CODE)])

    if 'return_to' in request.POST:
        return HttpResponseRedirect(request.POST['return_to'])
    else:
        return HttpResponseRedirect(reverse('landings.get_involved'))
Adds the logged in user to the contributor group
dataset/ETHPy150Open mozilla/kitsune/kitsune/users/views.py/make_contributor