S
S
Sergey2015-09-18 00:36:55
Yii
Sergey, 2015-09-18 00:36:55

How to remove automatic login when registering in Yii2?

How to turn off automatic login during registration

Answer the question

In order to leave comments, you need to log in

2 answer(s)
I
Igor Belikov, 2015-09-18
@igorbelikov

There it seems that you need to look at the registration form model, there, after the user is created, it authorizes him, this line should be removed :-)

E
Evgenii Kaidashov, 2015-09-18
@Evgenii-Kaidashov

Replace in SiteController -> actionSignup

if (Yii::$app->getUser()->login($user)) {
     return $this->goHome();
}

on thereturn $this->goHome();

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question