summaryrefslogtreecommitdiffstats
path: root/django_authopenid
diff options
context:
space:
mode:
authorRick Ross <rick@dzone.com>2010-01-16 18:05:12 -0500
committerRick Ross <rick@dzone.com>2010-01-16 18:05:12 -0500
commit7f062de941df3838f16d9c5c30fab35bed3dcc45 (patch)
treeb6e02d58b618a631de1eb586053e62feccc3e997 /django_authopenid
parentea3013f4f3a1013c1c4f28c3b06f6534374911d3 (diff)
downloadaskbot-7f062de941df3838f16d9c5c30fab35bed3dcc45.tar.gz
askbot-7f062de941df3838f16d9c5c30fab35bed3dcc45.tar.bz2
askbot-7f062de941df3838f16d9c5c30fab35bed3dcc45.zip
fix to make update profile work
Diffstat (limited to 'django_authopenid')
-rw-r--r--django_authopenid/forms.py3
1 files changed, 3 insertions, 0 deletions
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: