Merge pull request #539 from edegaudenzi/feature/532_show_validation_errors_during_registration

#532 show validation errors during registration
This commit is contained in:
Lorenzo Milesi
2024-02-27 09:18:45 +01:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@ -4,6 +4,7 @@
- Enh: Keycloak auth client (e.luhr)
- Fix: Social Network Auth (eluhr)
- Enh #532: /user/registration/register now shows form validation errors
- Enh: Allow/suggest new v3 releases of 2amigos 2fa dependencies: 2fa-library, qrcode-library (TonisOrmisson)
## 1.6.2 Jan 4th, 2024

View File

@ -144,6 +144,10 @@ class RegistrationController extends Controller
);
}
Yii::$app->session->setFlash('danger', Yii::t('usuario', 'User could not be registered.'));
} else {
if (Yii::$app->request->isPost && $form->getErrorSummary(false)) {
Yii::$app->session->setFlash('danger', implode(', ', $form->getErrorSummary(false)));
}
}
return $this->render('register', ['model' => $form, 'module' => $this->module]);
}