[1.x] Allow the expected email address request variable to be changed #28
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This pull requests gives the ability to change the expected name of the variable in the request that holds the email address when making requests for forgotten passwords and when setting a new password. As it is implemented currently, the request variable name
email
is hard coded into the controllers for both requesting a password reset link and for setting the new password after visiting the reset link. This pull request adds a new config option, similar to theusername
option that is currently there, to allow for changing the expected variable name.The implementation maintains the
email
name as a default value so that any existing applications should not experience any BC breaks.The ability to set the expected name of the email address request variable via a config value makes it much easier to integrate a new Laravel application that uses Fortify into an existing system that already has an established database schema that cannot be changed. Without the ability to change that hard coded value via config value, it appears as though the only solution to this problem would be to re-implement all of the password reset logic and controllers simply to change the one request variable.