In this task, we will convert the login action from the default authentication system provided by Yii to the authentication we have prepared in the previous tasks.
We are about to cut over to a new authentication system. Before we do, be sure to create a user for yourself with a password that you know! If you haven't already, log in as
admin, go to the Users screen, create a user named
admin with a password
test. You can give this user whatever first and last name you like. We are about to use it to log in.
UserIdentityfile ch3 | Source Files | protected | components | UserIdentity.php and replace the contents of the authenticate function with the following: