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

Lost Password form doesn't account for non-email unique_identifier_field #11567

Closed
2 tasks done
andrewandante opened this issue Jan 20, 2025 · 1 comment
Closed
2 tasks done
Assignees

Comments

@andrewandante
Copy link
Contributor

andrewandante commented Jan 20, 2025

Module version(s) affected

5, 6

Description

unique_identifier_field allows us to use something other than email address to uniquely identify users.

The logic in LostPasswordHandler makes sure that the form submission is handled correctly, but there are two other aspects that need addressing:

a) the labelling is incorrect (SilverStripe\Security\Member.EMAIL updates a few too many places)
b) the field type is incorrect (assumes EmailField)

While these are possible to overwrite, it seems heavy-handed for something that should come "bundled" with the config change.

Relates to this old issue (and related ones): #9517

How to reproduce

  • add a MemberExtension to add a Username field
  • set the value of unique_identifier_field to 'Username'
  • see that the LostPassword form asks you to enter your email, instead of your username

Possible Solution

PR here: #11568

Validations

  • Check that there isn't already an issue that reports the same bug
  • Double check that your reproduction steps work in a fresh installation of silverstripe/installer (with any code examples you've provided)

PRs

@GuySartorelli
Copy link
Member

PR merged. Will be automatically tagged by GitHub Actions

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