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

Added ability to use the email address when doing a reset password reque... #1116

Open
wants to merge 4 commits into
base: dev
Choose a base branch
from

Conversation

sardbaba
Copy link

This changes can be useful to let the user enter his/her email address when requesting a password reset. In our scenario, for example, the user name is dynamically generated (with an hashed and unique code) and for that reason the user only needs to enter her/his email address.
Hope this can be safely integrated.

@LostKobrakai
Copy link

It would be nice if you could make this optional. It's not a good idea to have this just added as is as people, who update to this, maybe don't want this behavior.

…r their email address when requesting a password reset
@sardbaba
Copy link
Author

You are right @LostKobrakai thanks
I've pushed also this https://github.com/sardbaba/ProcessWire/commit/0291df27073222728d2587e204e7d814fb02b33e to optionally add this feature.

@teppokoivula
Copy link

Whether it's a problem depends on the case, but it should be noted that email addresses for users are not unique, i.e. it's possible to have multiple users with identical email addresses at the same time.

I like this feature a lot (I myself tend to forget both passwords and usernames..) but this could be an issue, especially if ever combined with (for an example) automated registration system that doesn't properly force unique emails.

One relatively easy solution would be failing (silently) if more than one user matches given email. I think that this would make more sense than picking first user matching given email based on default sort setting.

@sardbaba
Copy link
Author

@teppokoivula in fact what you say is a sticking point, thanks for looking into this.
In our case we are blocking a second registration with the same email (https://bitbucket.org/mauro_mascia/processwire-social-login/src/03bd0852611d683a1642ad50339930fdf2a76784/classes/SocialLoginProcessRegistration.php?at=master#cl-135) and for that there is no way to register the same email (or maybe yes, when logging with a social login).
So, your solution to fail silently should be good.

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

Successfully merging this pull request may close these issues.

3 participants