Answer the question
In order to leave comments, you need to log in
Yii2. How to automatically authorize a user with registration data after registration?
Yii2. How to automatically authorize a user with registration data after registration?
Answer the question
In order to leave comments, you need to log in
$identity = User::findOne(['username' => $username]);
Yii::$app->user->login($identity);
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question