if ($model->load(Yii::$app->request->post())) { | if ($model->load(Yii::$app->request->post())) { | ||||
$user = $model->signup(); | $user = $model->signup(); | ||||
if ($user && $this->getUserCurrent()->login($user)) { | |||||
if ($user && Yii::$app->getUser()->login($user)) { | |||||
if ($model->isProducer()) { | if ($model->isProducer()) { | ||||
$this->redirect(Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index'])); | $this->redirect(Yii::$app->urlManagerBackend->createAbsoluteUrl(['site/index'])); | ||||
} | } |