Fixes username regex

This commit is contained in:
Mouse Reeve
2021-01-06 16:01:13 -08:00
parent 03a5f333e1
commit 54f27519df
3 changed files with 4 additions and 3 deletions

View File

@@ -170,6 +170,7 @@ class User(OrderedCollectionPageMixin, AbstractUser):
def save(self, *args, **kwargs):
''' populate fields for new local users '''
# this user already exists, no need to populate fields
print(self.username)
if not self.local and not re.match(regex.full_username, self.username):
# generate a username that uses the domain (webfinger format)
actor_parts = urlparse(self.remote_id)