user.php 910 Bytes
Newer Older
Mark committed
1 2 3
<?php

return [
4 5
    'username' => 'userName',
    'auth_key' => function ($fixture, $faker, $index) {
6
        $fixture['auth_key'] = Yii::$app->getSecurity()->generateRandomKey();
7 8 9 10

        return $fixture;
    },
    'password_hash' => function ($fixture, $faker, $index) {
11
        $fixture['password_hash'] = Yii::$app->getSecurity()->generatePasswordHash('password_' . $index);
12 13 14 15

        return $fixture;
    },
    'password_reset_token' => function ($fixture, $faker, $index) {
16
        $fixture['password_reset_token'] = Yii::$app->getSecurity()->generateRandomKey() . '_' . time();
17 18 19 20 21 22 23 24 25 26 27 28 29 30

        return $fixture;
    },
    'created_at' => function ($fixture, $faker, $index) {
        $fixture['created_at'] = time();

        return $fixture;
    },
    'updated_at' => function ($fixture, $faker, $index) {
        $fixture['updated_at'] = time();

        return $fixture;
    },
    'email' => 'email',
Mark committed
31
];