You are here

function _phonefield_user_import_callback in Phone Field 7

Callback to extract field values.

1 string reference to '_phonefield_user_import_callback'
phonefield_field_user_import_supported_alter in ./phonefield.module
Implements hook_field_user_import_supported_alter().

File

./phonefield.module, line 557
Hooks for a module that defines a simple phone number field type.

Code

function _phonefield_user_import_callback($user_fields, $field_name, $values) {
  $field = array();
  for ($ii = 0; $ii < count($values); $ii++) {
    if (!empty($values[$ii])) {
      $field[LANGUAGE_NONE][$ii]['phonenumber'] = $values[$ii];
    }
  }
  return $field;
}