public function MigrateProfileUserHandler::fields in Migrate 6.2
Returns a list of fields available to be mapped for users.
Return value
array Keys: machine names of the fields (to be passed to addFieldMapping) Values: Human-friendly descriptions of the fields.
File
- plugins/
destinations/ profile.inc, line 25 - Support for profile.module fields as a destination.
Class
- MigrateProfileUserHandler
- Destination class handling profile.module data.
Code
public function fields() {
$fields = array();
if (module_exists('profile')) {
foreach (profile_categories() as $category) {
$result = _profile_get_fields($category['name'], FALSE);
while ($field = db_fetch_object($result)) {
$fields[$field->name] = $field->category . ': ' . $field->title;
}
}
}
return $fields;
}