Skip to content

Commit

Permalink
Merge pull request #451 from TonisOrmisson/fixed-ajax-login-events
Browse files Browse the repository at this point in the history
Fixed issue: remove after/before login events from ajax LoginForm val…
  • Loading branch information
maxxer committed Apr 4, 2022
2 parents 422a17d + b78656d commit 69e4bb6
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/User/Controller/SecurityController.php
Original file line number Diff line number Diff line change
Expand Up @@ -125,10 +125,8 @@ public function actionLogin()
if (Yii::$app->request->isAjax && $form->load(Yii::$app->request->post())) {
Yii::$app->response->format = Response::FORMAT_JSON;

$this->trigger(FormEvent::EVENT_BEFORE_LOGIN, $event);
$errors = ActiveForm::validate($form);
if(empty($errors)) {
$this->trigger(FormEvent::EVENT_AFTER_LOGIN, $event);
return $errors;
}
$this->trigger(FormEvent::EVENT_FAILED_LOGIN, $event);
Expand Down

0 comments on commit 69e4bb6

Please sign in to comment.