Closed edegaudenzi closed 4 months ago
Problem is in 2amigos/yii2-usuario/src/User/Controller/RegistrationController::actionRegister()
:
the if ($form->load(Yii::$app->request->post()) && $form->validate()) {
only evaluates when True; we need there an else
statement that sets a flash message like: Yii::$app->session->setFlash('danger', $form->getErrorSummary(false));
I've just submitted a PR, it looks something like this:
What steps will reproduce the problem?
End-user tries to register a new account through a custom
register.php
view that only requires theusername
field.What is the expected result?
Given both
username
andemail
fields are required, the page should reload showing a pop-up error reporting: "email is a required field" or something.What do you get instead?
The page reloads showing absolutely no sign of any error at all.