From 99b4b2c5b6e70d1c721c68b5ce911a5c79b30df4 Mon Sep 17 00:00:00 2001 From: Prabhu Ramachandran Date: Mon, 21 Nov 2011 10:20:22 +0530 Subject: BUG: usernames are case sensitive. The form checking code was assuming that usernames are case insensitive but this is not the case hence we now check for exact matches in the username. This prevented users who registered with an upper case username sometimes. --- exam/forms.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'exam/forms.py') diff --git a/exam/forms.py b/exam/forms.py index 0ae9d65..cb2d37d 100644 --- a/exam/forms.py +++ b/exam/forms.py @@ -28,7 +28,7 @@ class UserRegisterForm(forms.Form): raise forms.ValidationError(msg) try: - User.objects.get(username__iexact = u_name) + User.objects.get(username__exact = u_name) raise forms.ValidationError("Username already exists.") except User.DoesNotExist: return u_name -- cgit