How I can replace login with Username with login with email address? I linked my Database with the my project (use Gii) and I want to login only with the Email,but I get a lot of errors , I try to fix them but its a bit hard because I`m a bit new in Yii 2
Basically what you wanted to do could be done like the following:
In LoginForm model, replace $username with $email
In LoginForm::getUser(), call User::findByEmail($this->email) instead of User::findByUsername($this->username).
In User model, implement findByEmail() method if not yet implemented.