protected function FeedsUserProcessor::map in Feeds 7.2
Same name and namespace in other branches
- 6 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::map()
- 7 plugins/FeedsUserProcessor.inc \FeedsUserProcessor::map()
Overrides FeedsProcessor::map().
Ensures that the user is assigned additional roles that are configured on the settings. The roles could have been revoked when there was mapped to the "roles_list" target.
Overrides FeedsProcessor::map
File
- plugins/
FeedsUserProcessor.inc, line 275 - Contains FeedsUserProcessor.
Class
- FeedsUserProcessor
- Feeds processor plugin. Create users from feed items.
Code
protected function map(FeedsSource $source, FeedsParserResult $result, $target_item = NULL) {
$target_item = parent::map($source, $result, $target_item);
// Assign additional roles as configured.
$roles = array_filter($this->config['roles']);
foreach ($roles as $rid) {
$target_item->roles[$rid] = $rid;
}
return $target_item;
}