Skip to content

armgit / wger

Public Imported from GitHub
0

Self hosted FLOSS fitness/workout, nutrition and weight tracker

Fixed Duplicate Email Registration

JayanthBonthae2d9ac28eac3
diff --git a/AUTHORS.rst b/AUTHORS.rst
index abb43eee3..75326e5ec 100644
--- a/AUTHORS.rst
+++ b/AUTHORS.rst
@@ -74,6 +74,7 @@ Developers
* Bernardo Koen - https://github.com/BernardoKoen
* Gabriel Liss - https://github.com/gabeliss
* Alexandra Rhodes - https://github.com/arhodes130
+* Jayanth Bontha - https://github.com/JayanthBontha
Translators
-----------
diff --git a/wger/core/forms.py b/wger/core/forms.py
index 68f8f20c8..ee367da7b 100644
--- a/wger/core/forms.py
+++ b/wger/core/forms.py
@@ -196,7 +196,8 @@ class UserEmailForm(forms.ModelForm):
if not email:
return email
try:
- user = User.objects.get(email=email)
+ #Performs a case-insensitive lookup
+ user = User.objects.get(email__iexact=email)
if user.email == self.instance.email:
return email
except User.DoesNotExist: