user name cannot be an email address fixes #70

This commit is contained in:
rimu 2024-03-04 09:26:08 +13:00
parent 2c00577606
commit f754fdb2e8

View file

@ -144,6 +144,9 @@ def register(app):
user_name = input("Admin user name (ideally not 'admin'): ")
email = input("Admin email address: ")
password = input("Admin password: ")
while '@' in user_name:
print('User name cannot be an email address.')
user_name = input("Admin user name (ideally not 'admin'): ")
verification_token = random_token(16)
private_key, public_key = RsaKeys.generate_keypair()
admin_user = User(user_name=user_name, title=user_name,