public function FeedsUserProcessor::getMappingTargets in Feeds 7.2
Same name and namespace in other branches
- 6 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::getMappingTargets()
- 7 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::getMappingTargets()
Return available mapping targets.
Overrides FeedsProcessor::getMappingTargets
File
- plugins/
FeedsUserProcessor.inc, line 323 - Contains FeedsUserProcessor.
Class
- FeedsUserProcessor
- Feeds processor plugin. Create users from feed items.
Code
public function getMappingTargets() {
$targets = parent::getMappingTargets();
$targets += array(
'uid' => array(
'name' => t('User ID'),
'description' => t('The uid of the user. NOTE: use this feature with care, user ids are usually assigned by Drupal.'),
'optional_unique' => TRUE,
),
'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.'),
),
'pass' => array(
'name' => t('Password'),
'description' => t('The user password.'),
'summary_callbacks' => array(
array(
$this,
'passSummaryCallback',
),
),
'form_callbacks' => array(
array(
$this,
'passFormCallback',
),
),
),
'status' => array(
'name' => t('Account status'),
'description' => t('Whether a user is active or not. 1 stands for active, 0 for blocked.'),
),
'language' => array(
'name' => t('User language'),
'description' => t('Default language for the user.'),
),
'timezone' => array(
'name' => t('Timezone'),
'description' => t('The timezone identifier, like UTC or Europe/Lisbon.'),
),
'roles_list' => array(
'name' => t('User roles'),
'description' => t('User roles provided as role names in comma separated list.'),
'summary_callbacks' => array(
array(
$this,
'rolesListSummaryCallback',
),
),
'form_callbacks' => array(
array(
$this,
'rolesListFormCallback',
),
),
),
);
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,
);
}
$this
->getHookTargets($targets);
return $targets;
}