blob: 3123f41e0895aa99fe8b422b369e8108297723f8 [file] [log] [blame]
def on_login(self):
from webnotes.utils import validate_email_add
from webnotes import conf
if "demo_notify_url" in conf:
if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
import requests
response = requests.post(conf.demo_notify_url, data={
"cmd":"portal.utils.send_message",
"subject":"Logged into Demo",
"sender": webnotes.form_dict.lead_email,
"message": "via demo.erpnext.com"
})