Skip to content

Added site option for enforcing one-user-per-email

Franco Aiscasi requested to merge francoaiscasi/Postmill:one_user_per_email into main

Hello, to sum up:

  • created new validator that triggers a constraint validation check only if a certain condition involving the current site is true
  • added new site option oneUserPerEmail. However, the option is not enforced on existing accounts after this option is turned on (accounts with duplicate email addresses can continue to exist as they are)
  • in the site settings page, moved some settings to a new fieldset "users"

Some considerations:

  • there could be some performance issues (normalizedEmail is not indexed, so the uniqueness check may be slow)
  • since there is no email verification, a user can change their email to another dummy one and create a new account using the previous email (maybe email verification could be introduced)
  • since email is not required, the user can just omit it (a site option for requiring email may be added)

Merge request reports