function DevelGenerateCommands::users

Same name in this branch
  1. 5.x devel_generate/src/Drush/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Drush\Commands\DevelGenerateCommands::users()
Same name in other branches
  1. 8.x-1.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::users()
  2. 4.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::users()

Create users.

@command devel-generate:users @aliases genu, devel-generate-users @pluginId user

@option kill Delete all users before generating new ones. @option roles A comma delimited list of role IDs for new users. Don't specify 'authenticated'. @option pass Specify a password to be set for all generated users.

Parameters

int $num: Number of users to generate.

array $options: Array of options as described below.

File

devel_generate/src/Commands/DevelGenerateCommands.php, line 133

Class

DevelGenerateCommands
Provide Drush commands for all the Devel Generate processes.

Namespace

Drupal\devel_generate\Commands

Code

public function users($num = 50, array $options = [
    'kill' => FALSE,
    'roles' => self::REQ,
]) {
    // @todo pass $options to the plugins.
    $this->generate();
}