|
@@ -140,7 +140,8 @@ class Member(CoinLdapSyncMixin, AbstractUser):
|
|
|
username = unicodedata.normalize('NFD', username)\
|
|
|
.encode('ascii', 'ignore')
|
|
|
# Enlever ponctuation et espace
|
|
|
- username = username.translate(None, string.punctuation + ' ')
|
|
|
+ punctuation = (string.punctuation + ' ').encode('ascii')
|
|
|
+ username = username.translate(None, punctuation)
|
|
|
# En minuscule
|
|
|
username = username.lower()
|
|
|
# Maximum de 30 char
|