Closed jashirouprotips closed 4 years ago
Hi @jashirouprotips,
You should set the layout to 'main-login' or false.
public function actionLogin()
{
// $this->layout = 'main-login';
$this->layout = false;
if (!Yii::$app->user->isGuest) {
return $this->goHome();
}
$model = new LoginForm();
if ($model->load(Yii::$app->request->post()) && $model->login()) {
return $this->goBack();
} else {
$model->password = '';
return $this->render('login', [
'model' => $model,
]);
}
}
Hi @jashirouprotips,
You should set the layout to 'main-login' or false.
public function actionLogin() { // $this->layout = 'main-login'; $this->layout = false; if (!Yii::$app->user->isGuest) { return $this->goHome(); } $model = new LoginForm(); if ($model->load(Yii::$app->request->post()) && $model->login()) { return $this->goBack(); } else { $model->password = ''; return $this->render('login', [ 'model' => $model, ]); } }
Excellent...you saved my day...
Thanks again dude...well done with this plugin...
Hi,
I have an issue with the login view.
My boss want the classic login form, where the form is alone and the others elements (sidebar and navbar) are not included in the "site/login" route.
How can I change this:
To this?:
I will really very thankfully.
Thanks in advance.