- 🇮🇹Italy apaderno Brescia, 🇮🇹
+ $random_generator = new Random(); $edit = [];
The
UserRegistrationTest
class has therandomMachineName()
and therandomString()
methods. Using theRandom
class should not be necessary. - 🇸🇰Slovakia poker10
I think there are still some unresolved questions, for example the one from #27:
What will occur if there are duplicates when the schema change is implemented?
It is also important to think about case-sensitivity. In MySQL unique columns are case insensitive by default, so you cannot have
test@test.com
andTEST@test.com
. On the other side, in PostgreSQL, these are case sensitive and by default it will allowtest@test.com
andTEST@test.com
in the unique columns. This can cause another confusion if not handled properly.In my opinion, the uniqueness validation could remain only in code. There are lot of contrib modules creating weird email addresses just to workaround the need of the email address, or even saving empty email addresses and this change could potentially break all these.
- 🇺🇸United States AaronBauman Philadelphia
Should we get rid of all other database constraints as well then?
Why do we unique constraints for UUID or username?Seems like maybe we need to define a decision making criteria for when database constraints are warranted.
- Status changed to Closed: won't fix
over 1 year ago 5:25pm 29 March 2023 - 🇺🇸United States moshe weitzman Boston, MA
Hi all - user module maintainer here.
If I were designing Drupal from scratch, I would certainly put a uniqueness constraint in the DB. But we are now 22 years into Drupal's life, and I think that ship has sailed. We dont want to disrupt existing sites so much. Folks who want to add this constraint to their DB are free to do so via schema alter. See UserStorageSchema::getEntitySchema().
Lets focus improving our add/edit validators as needed. And lets do that in other issues.
I respectfully close this long-standing issue.
- 🇳🇱Netherlands daffie
I think this functionality would be great for a contrib module.