public function actionLogin() { if (!yii::$app->user->isGuest) { $this->redirect(['account/overview']); } $model = new _LoginForm(); if (!empty($_POST['phone']) && !empty($_POST['password'])) { $username = $_POST['phone']; $password = $_POST['password']; if ($model->login($username, $password)) { } } else { return $this->render('login', compact("model")); } }
public function actionDosignin() { if ($_POST) { $username = $_POST['username']; $password = $_POST['password']; $model = new _LoginForm(); if ($model->login($username, $password)) { } } }