diff --git a/CHANGELOG.md b/CHANGELOG.md index 07e2be50..f922f622 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/User/Controller/RegistrationController.php b/src/User/Controller/RegistrationController.php index 0cfe1953..aa5f3b8a 100644 --- a/src/User/Controller/RegistrationController.php +++ b/src/User/Controller/RegistrationController.php @@ -144,6 +144,10 @@ public function actionRegister() ); } 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]); }