services:
    oro_user.api.set_user_profile_entity_id:
        class: Oro\Bundle\UserBundle\Api\Processor\SetUserProfileEntityId
        arguments:
            - '@security.token_storage'
        tags:
            - { name: oro.api.processor, action: get, group: normalize_input, class: Oro\Bundle\UserBundle\Api\Model\UserProfile }

    oro_user.api.add_user_profile_hateoas_links:
        class: Oro\Bundle\UserBundle\Api\Processor\AddUserProfileHateoasLinks
        arguments:
            - '@oro_api.rest.routes_registry'
            - '@router'
            - '@oro_api.value_normalizer'
            - '@oro_api.subresources_provider'
        tags:
            - { name: oro.api.processor, action: get_metadata, extra: hateoas, requestType: rest&json_api, class: Oro\Bundle\UserBundle\Api\Model\UserProfile, priority: -195 }

    oro_user.api.reload_logged_in_user:
        class: Oro\Bundle\UserBundle\Api\Processor\ReloadLoggedInUser
        arguments:
            - '@oro_user.manager'
            - '@oro_security.token_accessor'
        tags:
            - { name: oro.api.processor, action: customize_form_data, event: post_validate, parentAction: update, class: Oro\Bundle\UserBundle\Entity\User }

    oro_user.api.update_new_user:
        class: Oro\Bundle\UserBundle\Api\Processor\UpdateNewUser
        arguments:
            - '@oro_user.manager'
        tags:
            - { name: oro.api.processor, action: customize_form_data, event: post_validate, parentAction: create, class: Oro\Bundle\UserBundle\Entity\User }

    oro_user.api.disable_user:
        class: Oro\Bundle\UserBundle\Api\Processor\DisableUserByDefault
        tags:
            - { name: oro.api.processor, action: customize_form_data, event: pre_validate, parentAction: create, class: Oro\Bundle\UserBundle\Entity\User }

    oro_user.api.user.set_case_sensitivity_for_email_filter:
        class: Oro\Bundle\ApiBundle\Processor\Shared\SetCaseSensitivityForFilter
        arguments:
            - '@oro_config.manager'
            - 'email'
            - 'oro_user.case_insensitive_email_addresses_enabled'
        tags:
            - { name: oro.api.processor, action: get, group: normalize_input, class: Oro\Bundle\UserBundle\Entity\User, priority: -120 }
            - { name: oro.api.processor, action: get_list, group: normalize_input, class: Oro\Bundle\UserBundle\Entity\User, priority: -120 }
