Esempio n. 1
0
 public function actionLogin()
 {
     $model = new ClientUsers();
     if ($model->load(Yii::$app->request->post())) {
         if ($model->login()) {
             return ['auth_key' => $model->auth_key];
         }
     }
     throw new HttpException(401, 'You have not been authorized ' . Helper::recursive_implode($model->errors, ',', false, false));
 }