user.php 889 Bytes
Newer Older
Mark committed
1 2 3 4 5
<?php

use yii\helpers\Security;

return [
6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
    'username' => 'userName',
    'auth_key' => function ($fixture, $faker, $index) {
        $fixture['auth_key'] = Security::generateRandomKey();

        return $fixture;
    },
    'password_hash' => function ($fixture, $faker, $index) {
        $fixture['password_hash'] = Security::generatePasswordHash('password_' . $index);

        return $fixture;
    },
    'password_reset_token' => function ($fixture, $faker, $index) {
        $fixture['password_reset_token'] = Security::generateRandomKey() . '_' . time();

        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
33
];