def METHOD_NAME(client, phase_factory, user):
    phase, module, project, idea = setup_phase(
        phase_factory, None, CollectFeedbackPhase
    )
    assert user not in module.project.participants.all()
    module.project.participants.add(user)
    url = component.get_base_url(project)
    initiator = module.project.organisation.initiators.first()
    client.login(username=initiator.email, password="password")
    response = client.get(url)
    assert_template_response(response, "a4_candy_projects/project_participants.html")
    data = {
        "add_users": "test1@foo.bar, test2@foo.bar, " + user.email,
    }
    response = client.post(url, data)
    assert redirect_target(response) == "dashboard-{}-edit".format(component.identifier)
    assert ParticipantInvite.objects.get(email="test1@foo.bar")
    assert ParticipantInvite.objects.get(email="test2@foo.bar")
    messages = list(get_messages(response.wsgi_request))
    assert len(messages) == 2
    assert str(messages[0]) == (
        "Following users already accepted an invitation: " + user.email
    )
    assert str(messages[1]) == ("2 participants invited.")
    data = {
        "add_users": "test1@foo.bar",
    }
    response = client.post(url, data)
    messages = list(get_messages(response.wsgi_request))
    assert len(messages) == 4
    assert str(messages[2]) == ("Following users are already invited: test1@foo.bar")
    assert str(messages[3]) == ("0 participants invited.")