~stephen-stewart/canonical-identity-provider/2fa-css-counters

« back to all changes in this revision

Viewing changes to src/webui/views/account.py

  • Committer: Tarmac
  • Author(s): James Westby
  • Date: 2013-08-26 21:02:57 UTC
  • mfrom: (1029.1.2 email-timeout)
  • Revision ID: tarmac-20130826210257-9ir2e7us4s8vwq2b
[r=matiasb] Don't allow adding an email that is already registered with a different case.

When registering you can't use a different-case version of someone else's
email. However, you could add one after you registered if the other person
hadn't validated yet.

Show diffs side-by-side

added added

removed removed

Lines of Context:
315
315
 
316
316
    # email may not exist since the user may have tried an operation with
317
317
    # an email unknown to our system
318
 
    emails = EmailAddress.objects.filter(email=email_address)
 
318
    emails = EmailAddress.objects.filter(email__iexact=email_address)
319
319
    if emails.count() == 0:
320
320
        # This case matches, for example, registration web where the Account
321
321
        # is not created until the user validates the email address.