I did the Yii blog tutorial, but in the tutorial I don’t find any informations or examples about, how I can add the admin to the user table. I didthis description., and I found sql command in the data directory, but that only add the demo user to the database.
And my main problem is that, I have no idea, how I can add the admin user to the table with hashed password.
I found this only:
INSERT INTO tbl_user (username, password, email) VALUES ('demo','$2a$10$JTJf6/XqC94rrOtzuF397OHa4mbmZrVTBOQCmYD9U.obZRUut4BoC','webmaster@example.com');
I read this auth topic too, but I don’t find any examples . I think I should generate the User model and crud with the gii, but I would like to do this without these .
I only just want to add the admin user to my table, with hashed password code.
Can somebody help me? Or give me an example, or description, what is the easiest way to add the user? This is a very small webapp, so I don’t need RBAC, just add the admin with hashed code.