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

[5.x]: Update error messages for users/send-password-reset-email when useEmailAsUsername is enabled #15425

Closed
romainpoirier opened this issue Jul 26, 2024 · 1 comment
Labels

Comments

@romainpoirier
Copy link

What happened?

Description

In Craft CMS 5, the users/send-password-reset-email action returns the following error messages:

  • Craft::t('app', 'Username or email is required.')
  • Craft::t('app', 'Invalid username or email.')

However, when the useEmailAsUsername configuration is enabled, referencing the username in the front-end is no longer relevant.

Can the messages be adapted to the following when useEmailAsUsername is true?

  • Craft::t('app', 'Email is required.')
  • Craft::t('app', 'Invalid email.')

Steps to reproduce

  1. Enable the useEmailAsUsername configuration.
  2. Attempt to use the users/send-password-reset-email action.

Expected behavior

The error messages should only reference the email when useEmailAsUsername is true.

Actual behavior

The error messages reference both the username and email, which is not relevant when useEmailAsUsername is true.

Craft CMS version

5.2.8

PHP version

No response

Operating system and version

No response

Database type and version

No response

Image driver and version

No response

Installed plugins and versions

brandonkelly added a commit that referenced this issue Jul 26, 2024
@brandonkelly
Copy link
Member

Thanks for pointing that out! Fixed for Craft 4.11 and 5.3.

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

No branches or pull requests

2 participants