blob: 3123f41e0895aa99fe8b422b369e8108297723f8 [file] [log] [blame]
Rushabh Mehtaacd33672013-08-26 16:17:50 +05301
2 def on_login(self):
3 from webnotes.utils import validate_email_add
Pratik Vyascfed8c42013-09-21 15:16:47 +05304 from webnotes import conf
Anand Doshide8b6aa2013-09-24 17:17:39 +05305 if "demo_notify_url" in conf:
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"
Pratik Vyascfed8c42013-09-21 15:16:47 +053013 })