mirror of
https://github.com/elyby/accounts.git
synced 2024-10-30 07:23:12 +05:30
18 lines
454 B
PHP
18 lines
454 B
PHP
<?php
|
|
/**
|
|
* @var $faker \Faker\Generator
|
|
* @var $index integer
|
|
*/
|
|
|
|
$security = Yii::$app->getSecurity();
|
|
|
|
return [
|
|
'username' => $faker->userName,
|
|
'email' => $faker->email,
|
|
'auth_key' => $security->generateRandomString(),
|
|
'password_hash' => $security->generatePasswordHash('password_' . $index),
|
|
'password_reset_token' => $security->generateRandomString() . '_' . time(),
|
|
'created_at' => time(),
|
|
'updated_at' => time(),
|
|
];
|