Involving email addresses in the discussion complicates things because of the involvement of the email RFC (or RFCs?) which IIRC dictates that the mailbox portion of an email address may be case sensitive.
Back to OPs point, I feel that you should respect the case of a username for display purposes. I’d merely do a case insensitive / normalisation check for operations like login and conflict checking on signup / username change. As far as email addresses are concerned, this is even more justifiable as you could be dealing with a case sensitive email server. No idea how common that is these days. On Sat, 5 Jan 2019 at 10:12 pm, אורי <u...@speedy.net> wrote: > In Speedy Net all usernames and slugs must be lowercase. If they are > entered not lowercase they are converted to lowercase. I don't see any > reason why usernames should not be lowercase, especially if there are 2 > different users with usernames which differ only in case. > > All email addresses in Speedy Net are also converted to lowercase and > saved lowercase in the database. I think it would be absurd if > u...@speedy.net, u...@speedy.net and u...@speedy.net would belong to 3 > different people with 3 different usernames and email addresses. > > From > https://github.com/speedy-net/speedy-net/blob/uri_merge_with_master_2018-12-31_a/speedy/core/accounts/tests/test_forms.py > : > > def test_slug_gets_converted_to_lowercase(self): > data = self.data.copy() > data['slug'] = 'THIS-IS-A-SLUG' > form = RegistrationForm(language_code=self.language_code, > data=data) > form.full_clean() > self.assertTrue(expr=form.is_valid()) > self.assertDictEqual(d1=form.errors, d2={}) > user = form.save() > self.assertEqual(first=user.slug, second='this-is-a-slug') > self.assertEqual(first=user.username, second='thisisaslug') > > def test_email_gets_converted_to_lowercase(self): > data = self.data.copy() > data['email'] = 'emai...@example.com' > form = RegistrationForm(language_code=self.language_code, > data=data) > form.full_clean() > self.assertTrue(expr=form.is_valid()) > self.assertDictEqual(d1=form.errors, d2={}) > user = form.save() > email_addresses = UserEmailAddress.objects.filter(user=user) > email_addresses_set = {e.email for e in email_addresses} > self.assertSetEqual(set1=email_addresses_set, set2={' > emai...@example.com'}) > > > > אורי (Uri) > u...@speedy.net > > > On Sat, Jan 5, 2019 at 3:18 PM Shelagh Lewins <shelagh.lew...@gmail.com> > wrote: > >> I think case-insensitive usernames is a must-have in the mobile world. >> Users who register on mobile don't notice that their phone has >> automatically capitalised the first letter of their username when they >> enter it, and are then unable to log in on laptops because they are typing >> the lower-case version. >> >> And because case-sensitive usernames are so unexpected, developers are >> likely not to notice the problem until some way into the project. >> >> To expect every developer to modify the auth model because it doesn't >> provide standard functionality seems like the wrong approach to me. >> >> If there are concerns about backwards compatibility, why not make it an >> optional setting? >> >> -- >> You received this message because you are subscribed to the Google Groups >> "Django developers (Contributions to Django itself)" group. >> To unsubscribe from this group and stop receiving emails from it, send an >> email to django-developers+unsubscr...@googlegroups.com. >> To post to this group, send email to django-developers@googlegroups.com. >> Visit this group at https://groups.google.com/group/django-developers. >> To view this discussion on the web visit >> https://groups.google.com/d/msgid/django-developers/3b6d56fd-2664-4b56-8712-e76d51c73172%40googlegroups.com >> <https://groups.google.com/d/msgid/django-developers/3b6d56fd-2664-4b56-8712-e76d51c73172%40googlegroups.com?utm_medium=email&utm_source=footer> >> . >> For more options, visit https://groups.google.com/d/optout. >> > -- > You received this message because you are subscribed to the Google Groups > "Django developers (Contributions to Django itself)" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to django-developers+unsubscr...@googlegroups.com. > To post to this group, send email to django-developers@googlegroups.com. > Visit this group at https://groups.google.com/group/django-developers. > To view this discussion on the web visit > https://groups.google.com/d/msgid/django-developers/CABD5YeFm3A2k7V8zeRPBxyu8zMv7msnmU1ogS_SrCJT76H_Fzw%40mail.gmail.com > <https://groups.google.com/d/msgid/django-developers/CABD5YeFm3A2k7V8zeRPBxyu8zMv7msnmU1ogS_SrCJT76H_Fzw%40mail.gmail.com?utm_medium=email&utm_source=footer> > . > For more options, visit https://groups.google.com/d/optout. > -- You received this message because you are subscribed to the Google Groups "Django developers (Contributions to Django itself)" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-developers+unsubscr...@googlegroups.com. To post to this group, send email to django-developers@googlegroups.com. Visit this group at https://groups.google.com/group/django-developers. To view this discussion on the web visit https://groups.google.com/d/msgid/django-developers/CANK-ykkFovkYbB921%2BH5yejZFv6CehLnzmQcqZ4EPKr7WRUjww%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.