Why is not authenticated the user after registration in Yii 2?

Good day

There is almost a standard action for the user registration.
After you save the user I want to authenticate. But autentifici not working.

if (!Yii::$app->user->isGuest) {
 return $this->redirect(['/order/client']);
}

 $model = new SignupForm();
 if ($model->load(Yii::$app->request->post())) {
 if ($user = $model->signup()) {
Yii::$app->user->login($user);

 Yii::$app->getSession()->setFlash('success', 'Confirm you email address');
 $redirectUrl = Yii::$app->request->get('redirect');
 if ($redirectUrl) {
 return $this->redirect(urldecode($redirectUrl));
}

 return $this->refresh();
}
}

 return $this->render('signup', [
 'model' => $model,
 ]);


After the redirect the user is not authenticated. I can not understand in what business.
Model klementinum user interface yii\web\IdentityInterface
June 14th 19 at 18:58
1 answer
June 14th 19 at 19:00
Return Yii::$app->user->login($user) ?
true - reba commented on June 14th 19 at 19:03
after login what lies in Yii::$app->user->identity? - daron commented on June 14th 19 at 19:06
, \app\models\User - reba commented on June 14th 19 at 19:09
enableSession included? Need more information, logs show that in the debug panel. - Rosanna.Ha commented on June 14th 19 at 19:12

Find more questions by tags PHPYii