limit username to 30 chars (#6636)

This commit is contained in:
Serghei Mihai 2015-03-09 14:14:28 +01:00
parent a838d08d1d
commit e9d6739020
1 changed files with 1 additions and 1 deletions

View File

@ -158,7 +158,7 @@ class RegistrationCompletionForm(forms.UserAttributeFormMixin, Form):
if field.startswith('password'):
continue
if field == 'username':
kwargs[field] = uuid4().get_hex()
kwargs[field] = uuid4().get_hex()[:30]
user_fields[field] = kwargs[field]
if field == 'email':
user_fields[field] = BaseUserManager.normalize_email(kwargs[field])