brotherton-erpnext/erpnext/startup/event_handlers.py

18 lines
630 B
Python
Raw Normal View History

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