brotherton-erpnext/erpnext/startup/event_handlers.py

18 lines
641 B
Python
Raw Normal View History

2013-11-20 07:29:58 +00:00
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
# License: GNU General Public License v3. See license.txt"
2013-01-09 11:09:27 +00:00
2012-02-23 07:05:32 +00:00
from __future__ import unicode_literals
2014-02-14 10:17:51 +00:00
import frappe
2014-02-28 06:23:30 +00:00
from erpnext.home import make_feed
def on_session_creation(login_manager):
2014-03-13 15:14:10 +00:00
"""make feed"""
2014-02-14 10:17:51 +00:00
if frappe.session['user'] not in ('Guest'):
2012-02-03 07:26:12 +00:00
# create feed
2014-02-14 10:17:51 +00:00
from frappe.utils import nowtime
from frappe.utils.user import get_user_fullname
make_feed('Login', 'User', login_manager.user, login_manager.user,
2012-10-15 10:00:56 +00:00
'%s logged in at %s' % (get_user_fullname(login_manager.user), nowtime()),
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')