def user_profiles_context(request):
    foreigner_profile = None
    dating_profile = None
    rental_owner_profile = None
    service_partner_profile = None
    property_manager_profile = None
    host_profile = None

    is_foreigner_user = False
    is_dating_partner_user = False
    is_rental_owner_user = False
    is_service_partner_user = False
    is_property_manager_user = False
    is_host_user = False
    is_staff_profile_user = False

    if request.user.is_authenticated:
        foreigner_profile = getattr(request.user, 'foreigner_profile', None)
        dating_profile = getattr(request.user, 'dating_profile', None)
        rental_owner_profile = getattr(request.user, 'rental_owner_profile', None)
        service_partner_profile = getattr(request.user, 'service_partner_profile', None)

        property_manager_profile = getattr(
            request.user,
            'property_manager_client_profile',
            None
        )

        host_profile = getattr(
            request.user,
            'host_profile',
            None
        )

        staff_profile = getattr(
            request.user,
            'staff_profile',
            None
        )

        is_foreigner_user = foreigner_profile is not None
        is_dating_partner_user = dating_profile is not None
        is_rental_owner_user = rental_owner_profile is not None
        is_service_partner_user = service_partner_profile is not None
        is_property_manager_user = property_manager_profile is not None
        is_host_user = host_profile is not None
        is_staff_profile_user = staff_profile is not None

    return {
        'foreigner_profile': foreigner_profile,
        'dating_profile': dating_profile,
        'rental_owner_profile': rental_owner_profile,
        'service_partner_profile': service_partner_profile,
        'property_manager_profile': property_manager_profile,
        'host_profile': host_profile,

        'is_foreigner_user': is_foreigner_user,
        'is_dating_partner_user': is_dating_partner_user,
        'is_rental_owner_user': is_rental_owner_user,
        'is_service_partner_user': is_service_partner_user,
        'is_property_manager_user': is_property_manager_user,
        'is_host_user': is_host_user,
        'is_staff_profile_user': is_staff_profile_user,
    }