The documentation for hook_feeds_processor_targets() starts on line 271 in https://cgit.drupalcode.org/feeds/tree/feeds.api.php. No examples in that documentation describe how to use this hook when the target is a field destined for the user entity (i.e. a field in the user profile).
The problem with the missing documentation surfaced in #2109227: Feeds Import Integration for nodes, where the patch in #42 implements hook_feeds_processor_targets(). This patch works as one would expect when creating the mapping for a Node processor, but fails for a User processor if the user profile has more than a single field we want to map.
The difference between the Node processor and the User processor is clear if we have two fields: field_a and field_b that we want to map, and try to add both to some node entity and the user entity, relying on an implementation of hook_feeds_processor_targets() as suggested by the documentation (i.e. without guidance for the user entity, the same implementation, based upon the suggestion for the node entity, is used for both entity types).
If the visit the mapping for the Node processor, both field_a and field_b appear in the pull-down menu in the “Target” column.
If the visit the mapping for the User processor, only the field_a. It is not possible to map field_b.
At the present time, this is what I know, so I've setting the component to “Documentation”.
If there is no code to support the user entity, plase change the component to “Code” and describe what code changes woyld be required to support this feature
Comments
Comment #2
gisleComment #3
bluegeek9 commentedUnfortunately, Drupal 7 is End of Life and no longer supported. We strongly encourage you to upgrade to a supported version of Drupal.