You are here

feeds_node_maps.inc in Feeds Node Helper 6

Same filename and directory in other branches
  1. 7 plugins/feeds_node_maps.inc

Allow for mapping values from an external roles system to drupal roles

File

plugins/feeds_node_maps.inc
View source
<?php

/**
 * @file
 * Allow for mapping values from an external roles system to drupal roles
 */

/**
 * feeds_tamper API definition for drupal role mapping
 */
$plugin = array(
  'form' => 'feeds_node_maps_form',
  'callback' => 'feeds_node_maps_callback',
  'name' => 'Current User ID',
  'multi' => 'single',
  'category' => 'Transform',
  'description' => 'Set the value to the currently logged in user',
);

/**
 * Form for building the user ID map, no options needed
 */
function feeds_node_maps_form($importer, $element_key, $settings) {
  $form = array();
  return $form;
}

/**
 * Helper function to process the value conversion
 */
function feeds_node_maps_callback($result, $item_key, $element_key, &$field, $settings) {
  global $user;
  $field = $user->uid;
}

Functions

Namesort descending Description
feeds_node_maps_callback Helper function to process the value conversion
feeds_node_maps_form Form for building the user ID map, no options needed