blob: 1f381d5eb6e4ac0f0e3eed3865e1fc82959357c6 [file] [log] [blame]
Rushabh Mehtaacd33672013-08-26 16:17:50 +05301
2 def on_login(self):
3 from webnotes.utils import validate_email_add
Anand Doshi619ed5e2013-09-17 13:46:50 +05304 import conf
5 if hasattr(conf, "demo_notify_url"):
Rushabh Mehtaacd33672013-08-26 16:17:50 +05306 if webnotes.form_dict.lead_email and validate_email_add(webnotes.form_dict.lead_email):
7 import requests
8 response = requests.post(conf.demo_notify_url, data={
Anand Doshi619ed5e2013-09-17 13:46:50 +05309 "cmd":"portal.utils.send_message",
Rushabh Mehtaacd33672013-08-26 16:17:50 +053010 "subject":"Logged into Demo",
11 "sender": webnotes.form_dict.lead_email,
12 "message": "via demo.erpnext.com"
Anand Doshi619ed5e2013-09-17 13:46:50 +053013 })