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

fix: can change email to an existing email (resolves #1826) #1834

Merged
merged 1 commit into from
Jun 29, 2023

Conversation

jobara
Copy link
Collaborator

@jobara jobara commented Jun 29, 2023

Resolves #1826

  • Updates the UniqueUserEmail custom rule to allow for specifying an id to ignore. Similar to how the unique laravel rule works.
  • Uses the updated UniqueUserEmail rule in all places where emails are updated. Laravel's unique validation rule can't be used here because the e-mails are encrypted in the database.
  • Note that tests weren't provided but I've filed a Write tests to validate user email update rules and behaviour #1833 writing them.

Prerequisites

If this PR changes PHP code or dependencies:

  • I've run composer format and fixed any code formatting issues.
  • I've run composer analyze and addressed any static analysis issues.
  • I've run php artisan test and ensured that all tests pass.
  • I've run composer localize to update localization source files and committed any changes.

If this PR changes CSS or JavaScript code or dependencies:

  • I've run npm run lint and fixed any linting issues.
  • I've run npm run build and ensured that CSS and JavaScript assets can be compiled.

@codecov
Copy link

codecov bot commented Jun 29, 2023

Codecov Report

Merging #1834 (7bdb26e) into dev (6246a46) will increase coverage by 0.00%.
The diff coverage is 100.00%.

@@            Coverage Diff            @@
##                dev    #1834   +/-   ##
=========================================
  Coverage     96.52%   96.52%           
- Complexity     2032     2033    +1     
=========================================
  Files           301      301           
  Lines          8745     8755   +10     
=========================================
+ Hits           8441     8451   +10     
  Misses          304      304           
Impacted Files Coverage Δ
...p/Actions/Fortify/UpdateUserProfileInformation.php 100.00% <100.00%> (ø)
app/Http/Controllers/IndividualController.php 100.00% <100.00%> (ø)
app/Http/Controllers/SettingsController.php 99.59% <100.00%> (ø)
...CommunicationAndConsultationPreferencesRequest.php 100.00% <100.00%> (ø)
...CommunicationAndConsultationPreferencesRequest.php 100.00% <100.00%> (ø)
app/Rules/UniqueUserEmail.php 100.00% <100.00%> (ø)

@jobara jobara merged commit 5e0dd3c into accessibility-exchange:dev Jun 29, 2023
marvinroman pushed a commit to marvinroman/platform that referenced this pull request Jul 24, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

Individual edit page: change email in contact methods - Can change email to an existing email
2 participants