You are here

interface BulkUserRegistrationInterface in Bulk User Registration 8

The bulk user registration interface.

@package Drupal\bulk_user_registration

Hierarchy

Expanded class hierarchy of BulkUserRegistrationInterface

All classes that implement BulkUserRegistrationInterface

1 file declares its use of BulkUserRegistrationInterface
BulkUserImport.php in src/Form/BulkUserImport.php

File

src/BulkUserRegistrationInterface.php, line 10

Namespace

Drupal\bulk_user_registration
View source
interface BulkUserRegistrationInterface {

  /**
   * User field names.
   */
  const FIELD_USER_NAME = 'username';
  const FIELD_EMAIL = 'email';
  const FIELD_STATUS = 'status';
  const FIELD_ROLE = 'role';

  /**
   * Creates and saves a user.
   *
   * @param array $userData
   *   Structured array of user data.
   * @param string $defaultRole
   *   The machine name of the default user role.
   *
   * @return \Drupal\user\UserInterface
   *   The saved user.
   */
  public function createUser(array $userData, $defaultRole);

  /**
   * Get CSV field names.
   *
   * @return string[]
   *   Structured array of field names with the field names as key. Extra fields
   *   are identified by the value TRUE. Default fields have a value FALSE.
   */
  public function getFieldNames();

}

Members