You are here

protected function GenerateProducts::getUsers in Commerce Bulk 8

Retrieve 50 uids from the database.

1 call to GenerateProducts::getUsers()
GenerateProducts::prepareGenerateProduct in modules/commerce_generate/src/Plugin/DevelGenerate/GenerateProducts.php

File

modules/commerce_generate/src/Plugin/DevelGenerate/GenerateProducts.php, line 677

Class

GenerateProducts
Provides a GenerateProducts plugin.

Namespace

Drupal\commerce_generate\Plugin\DevelGenerate

Code

protected function getUsers() {
  $users = [];
  $result = \Drupal::database()
    ->queryRange("SELECT uid FROM {users}", 0, 50);
  foreach ($result as $record) {
    $users[] = $record->uid;
  }
  return $users;
}