fix: username and email validations

This commit is contained in:
pateljannat
2021-05-07 13:47:33 +05:30
parent 84b4833fed
commit b3c67a3f34
3 changed files with 34 additions and 13 deletions

View File

@@ -74,7 +74,7 @@ def create_member_from_user(doc, method):
if ( doc.username and username_exists(doc.username)) or not doc.username:
username = create_username_from_email(doc.email)
elif len(doc.username) < 4:
elif len(doc.username) < 4 and doc.send_welcome_email == 1:
username = adjust_username(doc.username)
if username_exists(username):