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

Only validate for duplicate member email address when configured to do so #18747

Conversation

AndyButland
Copy link
Contributor

Prerequisites

  • I have added steps to test this contribution in the description below

Fixes: #18745

Description

This feature was introduced in 13.7 via #16202 but it looks like it wasn't fully merged up to 15. I've added the missing piece in this PR such that we only validate for duplicate member email address when configured to do so.

To Test:

  • Verify that you can or cannot create or update members with duplicate email addresses with the following configuration value set to false and true respectively.
  "Security": {
    "MemberRequireUniqueEmail": true|false,
    "UsernameIsEmail": false
  },

Sorry, something went wrong.

@nikolajlauridsen
Copy link
Contributor

The fix itself seems to work as intended, however it uncovers a different bug, if I set both MemberRequireUniqueEmail to false, and UsernameIsEmail to false then I do get to create two members with the same mail, but different login names, however this then updates the name of the member for both of them as you can see in this video:

bug.mp4

Looking at the database I can also see that the member table looks correct, however the node text are updated incorrectly:

image

image

I appreciate that this is technically a seperate issue, but might be worth tackling first 😄

@AndyButland
Copy link
Contributor Author

Good catch. Seems the problem came from a look-up by email that we do in creating members, and with this configuration that's not safe to do. I've switched it to do a look-up by username instead, as that will always be unique.

Copy link
Contributor

@nikolajlauridsen nikolajlauridsen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That did the trick, let's get this merged 👍

@nikolajlauridsen nikolajlauridsen merged commit 30633fe into v15/dev Mar 24, 2025
20 of 21 checks passed
@nikolajlauridsen nikolajlauridsen deleted the v15/bugfix/apply-setting-for-member-duplicate-email-address branch March 24, 2025 11:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants