From 180b3210d76a72451b93a0741ffb35c90d861c9f Mon Sep 17 00:00:00 2001 From: Rick Ross Date: Sat, 16 Jan 2010 18:05:36 -0500 Subject: fix to make update profile work --- django_authopenid/forms.py | 3 +++ 1 file changed, 3 insertions(+) (limited to 'django_authopenid/forms.py') diff --git a/django_authopenid/forms.py b/django_authopenid/forms.py index d4482751..6781401e 100644 --- a/django_authopenid/forms.py +++ b/django_authopenid/forms.py @@ -88,6 +88,9 @@ class UserNameField(forms.CharField): username = super(UserNameField,self).clean(username.strip()) if self.skip_clean == True: return username + if hasattr(self, 'user_instance'): + if username == self.user_instance.username: + return username if not username_re.search(username): raise forms.ValidationError(self.error_messages['invalid']) if username in self.RESERVED_NAMES: -- cgit v1.2.3-1-g7c22