Welcome Guest, Not a member yet? Register   Sign In
How to add users in Myth/Auth in batches
#5

(This post was last modified: 05-03-2022, 04:02 AM by yoshi.)

(05-03-2022, 12:53 AM)InsiteFX Wrote: Why not use the Database Seeder to add the data to the database table?

thanks InsiteFXWhy.

Yes, I am. I am using a database seeder to create users.

I have just noticed the 1st question's answer.
I discovered that the following two dummy users have different passwords.
Instead of using a converted value for each user, using a single converted value.

The password_hash function was converting the same words but spitting out different hashes. This was the cause.

PHP Code:
[
    'id' => 1,
    'email' => '[email protected]',
    'username' => 'sample teacher1',
    'activate_hash' => '59481d0b64af5c49a971bee3ea104ba9',
    'password_hash' => password_hash('apple1111'PASSWORD_DEFAULT),  <-- A
    
'active' => 1,
],
[
    'id' => 2,
    'email' => '[email protected]',
    'username' => 'sample teacher2',
    'activate_hash' => '579257a205f0b1c4947f01d4979afdf4',
    'password_hash' => password_hash('apple1111'PASSWORD_DEFAULT),  <-- B
    
'active' => 1,
], 
Reply


Messages In This Thread
RE: How to add users in Myth/Auth in batches and how to input user names in Japanese - by yoshi - 05-03-2022, 01:17 AM



Theme © iAndrew 2016 - Forum software by © MyBB