|
|
@@ -55,11 +55,11 @@ class OauthController extends BaseController
|
|
|
public function actionLogin() {
|
|
|
$model = new LoginForm();
|
|
|
if ($model->load(Yii::$app->request->post()) && $model->login()) {
|
|
|
- LoggerTool::debug(json_encode(['actionLoginSuccess', Yii::$app->request->post()]));
|
|
|
+ LoggerTool::debug(json_encode(['actionLoginSuccess', Yii::$app->request->post()], $_SERVER));
|
|
|
$token = Yii::$app->getUser()->getToken();
|
|
|
return static::notice($token);
|
|
|
} else {
|
|
|
- LoggerTool::debug(json_encode(['actionLoginFailed', Yii::$app->request->post()]));
|
|
|
+ LoggerTool::debug(json_encode(['actionLoginFailed', Yii::$app->request->post(), $model->getErrors(), $_SERVER]));
|
|
|
|
|
|
$firstError = $model->getFirstError('LoginForm');
|
|
|
if( $firstError === LoginForm::ERROR_IS_MODIFY_PASSWORD ) {
|