You are here

function profile_feeds_user_processor_targets_alter in Feeds 7

Same name and namespace in other branches
  1. 6 mappers/profile.inc \profile_feeds_user_processor_targets_alter()

Implements feeds_user_processor_target_alter().

File

mappers/profile.inc, line 11
On behalf implementation of Feeds mapping API for user profiles.

Code

function profile_feeds_user_processor_targets_alter(&$targets) {
  if (module_exists('profile')) {
    $categories = profile_categories();
    foreach ($categories as $category) {
      $result = _profile_get_fields($category['name']);
      while ($record = db_fetch_object($result)) {
        $targets[$record->name] = array(
          'name' => t('Profile:' . $record->title),
          'description' => t('Profile:' . $record->title),
          'callback' => 'profile_feeds_set_target',
        );
      }
    }
  }
}