You are here

function user_import_profile_load in User Import 7

Same name and namespace in other branches
  1. 8 user_import.module \user_import_profile_load()
  2. 5.2 user_import.module \user_import_profile_load()
  3. 5 user_import.module \user_import_profile_load()
  4. 6.4 user_import.module \user_import_profile_load()
  5. 6.2 user_import.module \user_import_profile_load()
  6. 7.2 user_import.module \user_import_profile_load()

File

./user_import.module, line 704
Import or update users with data from a comma separated file (csv).

Code

function user_import_profile_load($user) {
  $result = db_query('SELECT f.name, f.type, f.fid, v.value FROM {profile_field} f INNER JOIN {profile_values} v ON f.fid = v.fid WHERE uid = %d', $user->uid);
  foreach ($result as $field) {
    if (empty($profile[$field->fid])) {
      $profile[$field->fid] = _profile_field_serialize($field->type) ? unserialize($field->value) : $field->value;
    }
  }
  return $profile;
}