[5.8] Break out password reset credentials into a method#28370
[5.8] Break out password reset credentials into a method#28370taylorotwell merged 1 commit intolaravel:5.8from
Conversation
|
I understand the purpose here, but it doesn't seem like "credentials" is the correct method name for "retrieve email address from current request." |
|
@devcircus that is what PasswordBroker calls that array of data. |
|
Cool. That makes sense. |
|
@driesvints @taylorotwell This is a breaking change if you're using Spark. In spark we have the following code: Because both traits now have a
Can we revert this? |
|
There should be a way to make this work without reverting. Edit: maybe not? |
|
@devcircus another override in Spark needs to be applied like the one already in place. |
|
10-4. Ive ran into similar situations in various projects so I thought it could be fixed without reverting this. |
This addresses an issue that was introduced by laravel/framework#28370 which added a conflicting method name.
This breaks out the fetching of credentials from a password reset request into a separate method in a similar fashion to how it occurs in the
AuthenticatedUserstrait.My use-case for this is that I'm using Postgres which is case-sensitive by default, so when a user attempts to reset their password but uses capitals then it tells them their account doesn't exist and leaves them confused.
I'm already overriding
credentialsfor authentication in my own app for this. It might be nice to see LaravelStr::loweremail addresses out of the box, but as it appears Postgres-specific it might be overkill.This solution brings
SendsPasswordResetEmailsinto line withAuthenticatesUsersand allows developers, where necessary, to support email normalization.