mirror of
https://github.com/elyby/accounts.git
synced 2024-12-27 23:50:19 +05:30
21 lines
558 B
PHP
21 lines
558 B
PHP
<?php
|
|
/**
|
|
* @var $faker \Faker\Generator
|
|
* @var $index integer
|
|
*/
|
|
|
|
$security = Yii::$app->getSecurity();
|
|
|
|
return [
|
|
'uuid' => $faker->uuid,
|
|
'username' => $faker->userName,
|
|
'email' => $faker->email,
|
|
'password_hash' => $security->generatePasswordHash('password_' . $index),
|
|
'password_hash_strategy' => \common\models\Account::PASS_HASH_STRATEGY_YII2,
|
|
'lang' => 'en',
|
|
'auth_key' => $security->generateRandomString(),
|
|
'status' => \common\models\Account::STATUS_ACTIVE,
|
|
'created_at' => time(),
|
|
'updated_at' => time(),
|
|
];
|