Exemplo n.º 1
0
 /**
  * Logs in a user.
  *
  * @return mixed
  */
 public function actionLogin()
 {
     if (!\Yii::$app->user->isGuest) {
         return $this->goHome();
     }
     $post = Yii::$app->request->post();
     if (Yii::$app->request->isPost) {
         $r = Passport::login($post);
         $this->ajaxReturn($r);
         //return $this->goBack();
     }
     return $this->renderPartial('login');
 }