You are here

function uif_plus_process_addressfield in User Import Framework Plus 7

Process import of address field values.

Parameters

$account:

$field_info:

$value:

1 string reference to 'uif_plus_process_addressfield'
uif_plus_uif_supported_fields in ./uif_plus.module
Implements hook_uif_supported_fields().

File

./uif_plus.module, line 606
Advanced user import from a CSV file.

Code

function uif_plus_process_addressfield($account, $field_info, $value) {
  $addresses = explode(variable_get('uif_value_delimiter', '_*_'), $value);
  $values = array();
  foreach ($addresses as $address_string) {
    $address = array();
    $parts = explode(variable_get('uif_plus_addressfield_part_delimiter', '|'), $address_string);
    foreach ($parts as $part) {
      $field = explode(variable_get('uif_plus_addressfield_field_delimiter', ':'), $part);
      list($key, $val) = $field;
      $address[$key] = $val;
    }
    $values[] = $address;
  }
  return $values;
}