1
1
mirror of https://github.com/pterodactyl/panel.git synced 2024-11-22 00:52:43 +01:00

Generate a more unique username

This commit is contained in:
DaneEveritt 2022-06-26 16:37:43 -04:00
parent 43156e8d53
commit 3f2bd78563
No known key found for this signature in database
GPG Key ID: EEA66103B3D71F53

View File

@ -27,7 +27,7 @@ class UserFactory extends Factory
return [
'external_id' => null,
'uuid' => Uuid::uuid4()->toString(),
'username' => $this->faker->unique()->userName,
'username' => $this->faker->userName . '_' . Str::random(10),
'email' => Str::random(32) . '@example.com',
'name_first' => $this->faker->firstName,
'name_last' => $this->faker->lastName,
@ -45,10 +45,6 @@ class UserFactory extends Factory
*/
public function admin(): Factory
{
return $this->state(function (array $attributes) {
return [
'root_admin' => true,
];
});
return $this->state(['root_admin' => true]);
}
}