- $user = $this->entityTypeManager->getStorage('user')->create(
- [
- 'name' => $username,
- 'mail' => $username . '@example.com',
- 'pass' => $password?:$this->getRandom()->word(mt_rand(8, 16)),
- 'status' => mt_rand(0, 1),
- 'roles' => $roles[array_rand($roles)],
- 'created' => REQUEST_TIME - mt_rand(0, $timeRange),
- ]
- );
+ $user = $this->entityTypeManager->getStorage('user')->create(
+ [
+ 'name' => $username,
+ 'mail' => $username . '@example.com',
+ 'pass' => $password?:$this->getRandom()->word(mt_rand(8, 16)),
+ 'status' => mt_rand(0, 1),
+ 'roles' => $roles[array_rand($roles)],
+ 'created' => REQUEST_TIME - mt_rand(0, $timeRange),
+ ]
+ );