Why does the FOSUserBundle User entity have two properties for a username (and other fields)?
/** * @var string */ protected $username; /** * @var string */ protected $usernameCanonical;
I've read the docs, browsed the source code, and tried to search for information, and I can't find out why it exists. It seems to always store the same values. I'm sure there is a good reason, can someone fill me in?
Canonical fields get lowercased before comparison or search — to make sure there are no duplicates with the same value but with different case like [email protected]
and [email protected]
.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With