In some places we canonicalize email addresses to their lowercase form, but not everywhere. This can lead to problematic inconsistencies. E.g. after entering an email address with some uppercase chars, and verifying it, the Account Prefs page says "Unknown addr obj EMAIL@ADDR.COM" and doesn't let you set it as default.
Closed #711.
{allura,forge-classic}:ib/7813
I've added a couple of helper methods to
EmailAddress
and changed code to use them everywhere.Also changed
_update_emails
to save canonical name touser.email_addresses
when adding new email. Seems like nothing else should be changed. Even if we have old emails stored on user record in not canonical form it won't affect user-by-email and similar lookups (since they all happen viaEmailAddress
and use new helpers), and for display purposes we don't really care if it's canonical or not.