![]() |
How to add users in Myth/Auth in batches - Printable Version +- CodeIgniter Forums (https://forum.codeigniter.com) +-- Forum: CodeIgniter 4 (https://forum.codeigniter.com/forumdisplay.php?fid=28) +--- Forum: CodeIgniter 4 Discussion (https://forum.codeigniter.com/forumdisplay.php?fid=31) +--- Thread: How to add users in Myth/Auth in batches (/showthread.php?tid=81823) |
How to add users in Myth/Auth in batches - yoshi - 05-02-2022 Thanks for everything. I was able to add login functionality to an existing app using Myth/Auth, but the next step is to add a large number of dummy users for development. For example, creating a school management system, a school teacher and a school student (e.g. [email protected]). On the db, if I copy password_hash, activate_hash, active to the users I added with seeder, they can't seem to log in (great in production!). . Is there any way to add each user in bulk (dummy users can log in) with seeder or other software for development? Alternatively, it might be possible to add a non-activated user in seeder and add a record to the school_users table using only the id as a foreign key. RE: How to add users in Myth/Auth in batches and how to input user names in Japanese - JustJohnQ - 05-02-2022 I use the site below to generate dummy data: http://filldb.info/ RE: How to add users in Myth/Auth in batches and how to input user names in Japanese - yoshi - 05-03-2022 (05-02-2022, 11:29 PM)JustJohnQ Wrote: I use the site below to generate dummy data: thanks, JustJohnQI. ![]() I'm not having trouble creating dummy data itself, I just don't know how to approve dummy users in batches. RE: How to add users in Myth/Auth in batches and how to input user names in Japanese - InsiteFX - 05-03-2022 Why not use the Database Seeder to add the data to the database table? RE: How to add users in Myth/Auth in batches and how to input user names in Japanese - yoshi - 05-03-2022 (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: [ RE: How to add users in Myth/Auth in batches - kenjis - 05-03-2022 What's your problem? Myth:Auth has administration commands: https://github.com/lonnieezell/myth-auth/blob/develop/src/Commands/CreateUser.php https://github.com/lonnieezell/myth-auth/blob/develop/src/Commands/ActivateUser.php You can see how to do in them. RE: How to add users in Myth/Auth in batches - yoshi - 05-03-2022 (05-03-2022, 05:17 AM)kenjis Wrote: What's your problem? thanks, kenjis My problem was to copy a dummy user for testing the aggregation process. At first I thought that copying dummy users would not work because I did not know how to use Myth/Auth, but what I found out was that "the exact same word will produce different results when hashing is applied. This problem was solved by putting the value after hashing into a variable and using it around. |