function User::baseFields
Returns the user base fields to be migrated.
Return value
array Associative array having field name as key and description as value.
1 call to User::baseFields()
- User::fields in core/modules/ user/ src/ Plugin/ migrate/ source/ d6/ User.php 
- Returns available fields on the source.
File
- 
              core/modules/ user/ src/ Plugin/ migrate/ source/ d6/ User.php, line 98 
Class
- User
- Drupal 6 user source from database.
Namespace
Drupal\user\Plugin\migrate\source\d6Code
protected function baseFields() {
  $fields = [
    'uid' => $this->t('User ID'),
    'name' => $this->t('Username'),
    'pass' => $this->t('Password'),
    'mail' => $this->t('Email address'),
    'theme' => $this->t('Theme'),
    'signature' => $this->t('Signature'),
    'signature_format' => $this->t('Signature format'),
    'created' => $this->t('Registered timestamp'),
    'access' => $this->t('Last access timestamp'),
    'login' => $this->t('Last login timestamp'),
    'status' => $this->t('Status'),
    'timezone' => $this->t('Timezone'),
    'language' => $this->t('Language'),
    'picture' => $this->t('Picture'),
    'init' => $this->t('Init'),
    'data' => $this->t('User data'),
  ];
  // The database connection may not exist, for example, when building
  // the Migrate Message form.
  if ($source_database = $this->database) {
    // Possible field added by Date contributed module.
    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
    if ($source_database->schema()
      ->fieldExists('users', 'timezone_name')) {
      $fields['timezone_name'] = $this->t('Timezone (Date)');
    }
    // Possible field added by Event contributed module.
    // @see https://api.drupal.org/api/drupal/modules%21user%21user.install/function/user_update_7002/7
    if ($source_database->schema()
      ->fieldExists('users', 'timezone_id')) {
      $fields['timezone_id'] = $this->t('Timezone (Event)');
    }
  }
  return $fields;
}Buggy or inaccurate documentation? Please file an issue. Need support? Need help programming? Connect with the Drupal community.
