You are here

protected function WebformSubmissionDevelGenerateTrait::getUsers in Webform 8.5

Same name and namespace in other branches
  1. 6.x src/Plugin/DevelGenerate/WebformSubmissionDevelGenerateTrait.php \Drupal\webform\Plugin\DevelGenerate\WebformSubmissionDevelGenerateTrait::getUsers()

Retrieve 50 uids from the database.

Return value

array An array of uids.

1 call to WebformSubmissionDevelGenerateTrait::getUsers()
WebformSubmissionDevelGenerateTrait::initializeGenerate in src/Plugin/DevelGenerate/WebformSubmissionDevelGenerateTrait.php
Add 'users' that contains a list of uids.

File

src/Plugin/DevelGenerate/WebformSubmissionDevelGenerateTrait.php, line 438

Class

WebformSubmissionDevelGenerateTrait
Provides a WebformSubmissionDevelGenerate trait.

Namespace

Drupal\webform\Plugin\DevelGenerate

Code

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