Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using useEmailAsUsername = true silent fails when it should show error messages in the signup/register template #24

Open
zizther opened this issue Dec 16, 2022 · 2 comments

Comments

@zizther
Copy link

zizther commented Dec 16, 2022

When setting useEmailAsUsername to true in the general.php config file to enable users to control their username within a site requires the signup form to have a username field, if not and you try to submit the signup/register form with just an email address the form does not show any error messages and fails silently, it is only reported in the logs.
The form submits as it would if it were successful and redirects the user to the confirmation route, when it should not redirect and show the error messages.

Additionally if there are any custom validation rules added via a custom module for the username, these validation errors are not output in the signup/register form, these fails silently as well meaning the above scenario repeats.

It would be good for the signup form to take into account error messages and custom validation rules for elements such as usernames and passwords, with the appropriate error messages being output in the template.

@zizther zizther changed the title Using useEmailAsUsername = true silent fails Using useEmailAsUsername = true silent fails when it should show error messages in the signup/register template Dec 16, 2022
@jaymeh
Copy link
Contributor

jaymeh commented Apr 11, 2023

@zizther Good point, lot of stuff to be tested with this, we built this plugin around a single website and tailored it to that specific use case. I'll review it when I get some time (hopefully next week) and try to figure out a solution.

Thanks again!

@jaymeh
Copy link
Contributor

jaymeh commented Jul 10, 2024

@zizther I've added a potential fix in the attached Pull request. Let me know if this is what you had in mind?

Thanks

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants