Commits

Waldemar Kornewald  committed 8fd0bd5

Ported RegistrationFormUniqueEmail.

  • Participants
  • Parent commits 74499a5

Comments (0)

Files changed (1)

File registration/forms.py

         site.
         
         """
-        if User.objects.filter(email__iexact=self.cleaned_data['email']):
+        email = self.cleaned_data['email'].lower()
+        if User.all().filter('email =', email):
             raise forms.ValidationError(_(u'This email address is already in use. Please supply a different email address.'))
-        return self.cleaned_data['email']
+        return email
 
 
 class RegistrationFormNoFreeEmail(RegistrationForm):