You are here

public function DevelGenerateCommands::users in Devel 8.2

Same name and namespace in other branches
  1. 8.3 devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::users()
  2. 8 devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::users()
  3. 4.x devel_generate/src/Commands/DevelGenerateCommands.php \Drupal\devel_generate\Commands\DevelGenerateCommands::users()

Create users.

@command 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. @aliases genu, devel-generate-users

Parameters

$num Number of users to generate.:

File

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

Class

DevelGenerateCommands
For commands that are parts of modules, Drush expects to find commandfiles in __MODULE__/src/Commands, and the namespace is Drupal/__MODULE__/Commands.

Namespace

Drupal\devel_generate\Commands

Code

public function users($num = 50, $options = [
  'kill' => FALSE,
  'roles' => '',
]) {

  // @todo pass $options to the plugins.
  $this
    ->generate();
}