Repository navigation
Confirm an email change from the new address, notify the current one, require the current password (#571) - #580
Merged
Conversation
…rent one and require the current password (#571)
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #580 +/- ##
============================================
+ Coverage 97.06% 97.09% +0.02%
- Complexity 5318 5341 +23
============================================
Files 434 438 +4
Lines 13755 13817 +62
============================================
+ Hits 13351 13415 +64
+ Misses 404 402 -2
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Closes #571.
Breaking (2.0 alpha, no BC):
emailAddressand marks it verified, as before.newEmailAddressto a non-empty value that differs from the stored one needsoldPassword, the signed-in user's current password (a 422 onoldPasswordotherwise). This applies to API writes andNewEmailAddressType, which gains anoldPasswordfield. A super admin editing another user enters their own password. A cancel (null/''), or a write that leaves a pending change alone, needs no password.Added
user.emails.change_email_notice(canBeDisabled,subject).Not included (agreed): a cancel link and a
confirm_toconfig.Module and template: the module's admin user modal sends the admin's
oldPasswordin the same PATCH. The template's change-email form adds the field.Tests:
tests/Functional/User/NewEmailAddressTest.php(password required, wrong, admin uses own, unchanged pending needs none, both emails), the updatedEmailLinkHostTest,EmailRequestThrottleTestandUserPutTest, a new recipient helper inEmailTrait(assertTemplatedEmailSentTo(), tested inEmailTraitTest), and unit tests for the validator, the notice factory,MaskedEmailAddress, the notifier, the mailer and the config wiring.Expect conflicts with #577 (
UserDataProcessor, CHANGELOG, CLAUDE.md); this branch does not depend on it.🤖 Generated with Claude Code