Home >Backend Development >PHP Tutorial >Introduction to the method of modifying the built-in user table to other tables in Yii2.0
For some reason, I don’t want to use the user table that comes with Yii. I want to use the admin database table I built myself. How to modify it? The editor below will introduce to you how to modify the user table that comes with yii2.0 to other tables. Let’s take a look.
For some reason, I don’t want to use the user table that comes with yii. I want to use my own Create the admin database table and modify it as follows:
1. Refer to common\models\User
ModifyAdmin
2 in the advanced template. Modify
'user' => [ //'identityClass' => 'common\models\User', 'identityClass' => 'common\models\Admin', 'enableAutoLogin' => true,
3 in the configuration file. Modify LoginForm getUser()
to get the user from the admin table
The above is the detailed content of Introduction to the method of modifying the built-in user table to other tables in Yii2.0. For more information, please follow other related articles on the PHP Chinese website!