S
S
Sergey Kalina2018-03-29 20:37:42
Yii
Sergey Kalina, 2018-03-29 20:37:42

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

1 answer(s)
I
Immortal_pony, 2018-03-29
@Immortal_pony

$identity = User::findOne(['username' => $username]);
Yii::$app->user->login($identity);

(c) Documentation

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question