def moderate(request, backend='default', template_name='registration/registration_moderate.html', **kwargs):
    backend = get_backend(backend)
    profile = backend.get_profile(request, **kwargs)
    form_class = backend.get_moderation_form_class(request)

    if request.method == 'POST':
        form = form_class(request.POST)

        if form.is_valid():
            backend.moderate(request, form, profile, **kwargs)
            return redirect(backend.post_moderation_redirect(request, profile))
    else:
        form = form_class()

    return render(request, template_name, {
        'form': form,
        'profile': profile,
    })