Merge pull request #81 from fossunited/flow-fixes

fix: username and email validations
This commit is contained in:
Anand Chitipothu
2021-05-07 18:53:58 +05:30
committed by GitHub
7 changed files with 44 additions and 22 deletions

View File

@@ -47,6 +47,9 @@ class InviteRequest(Document):
@frappe.whitelist(allow_guest=True)
def create_invite_request(invite_email):
if not frappe.utils.validate_email_address(invite_email):
return "invalid email"
if frappe.db.exists("User", invite_email):
return "user"