Support for Drupal 7 is ending on 5 January 2025—it’s time to migrate to Drupal 10! Learn about the many benefits of Drupal 10 and find migration tools in our resource center.
The user migration classes support not only the core user properties like mail, name, etc., but also fields added by the core profile module, the Drupal 6 Content Profile module, or Drupal 7 custom fields. They take the following arguments:
- role_migration: The machine name of your role migration class, if any - used to set up dependencies and to properly map role assignments. If omitted, role assignments will not be migrated (they will default to authenticated user).
- picture_migration: The machine name of your picture migration class, if any. See below for a description of picture migration classes.
$user_arguments = $common_arguments + array(
'machine_name' => 'ExampleUser',
'description' => t('Import Drupal 6 users'),
'role_migration' => 'ExampleRole',
'picture_migration' => 'ExamplePicture',
);
Migration::registerMigration('DrupalUser6Migration',
$user_arguments['machine_name'], $user_arguments);