Yii2 doubts discussion :-

How to implement login page in Yii2 without using in build files and functions?

What are “in build files and functions”?

The files located in the folder common i.e. common/models/loginform.php and common/models/user.php are both in build files for login that works for user table i.e. default table in Yii2… So, i want to implement a login form that will be independent from this user table (in build table in Yii2)… means i want to use a customized table in order to perform login system… So, plz help me…


You can freely customize common\models\User and its underlying database table as log as you implement yii\web\IdentityInterface. Or, you may start with your own database table if you prefer. Anyway, the key point is implementing yii\web\IdentityInterface which is required by the authentication framework of yii.

Please consult the guide: