You are here

public function FeedsUserProcessor::getMappingTargets in Feeds 7

Same name and namespace in other branches
  1. 6 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::getMappingTargets()
  2. 7.2 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::getMappingTargets()

Return available mapping targets.

Overrides FeedsProcessor::getMappingTargets

File

plugins/FeedsUserProcessor.inc, line 165
FeedsUserProcessor class.

Class

FeedsUserProcessor
Feeds processor plugin. Create users from feed items.

Code

public function getMappingTargets() {
  $targets = array(
    'name' => array(
      'name' => t('User name'),
      'description' => t('Name of the user.'),
      'optional_unique' => TRUE,
    ),
    'mail' => array(
      'name' => t('Email address'),
      'description' => t('Email address of the user.'),
      'optional_unique' => TRUE,
    ),
    'created' => array(
      'name' => t('Created date'),
      'description' => t('The created (e. g. joined) data of the user.'),
    ),
  );
  if (module_exists('openid')) {
    $targets['openid'] = array(
      'name' => t('OpenID identifier'),
      'description' => t('The OpenID identifier of the user. <strong>CAUTION:</strong> Use only for migration purposes, misconfiguration of the OpenID identifier can lead to severe security breaches like users gaining access to accounts other than their own.'),
      'optional_unique' => TRUE,
    );
  }

  // Let other modules expose mapping targets.
  self::loadMappers();
  feeds_alter('feeds_processor_targets', $targets, 'user');
  return $targets;
}