Answer the question
In order to leave comments, you need to log in
How in Yii2 to specify models at login a choice from two fields?
Hello. How to login using either username or email in Yii2?
So far, the idea is only with "range"
Answer the question
In order to leave comments, you need to log in
Try in LoginForm, in getUser search either by login or by email.
Set the validation rules accordingly so that you don’t swear at the absence of one of the parameters, for the login, if instead of the login email and for email, if the login is specified instead of email.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question