2013-11-20 07:29:58 +00:00
|
|
|
# Copyright (c) 2013, Web Notes Technologies Pvt. Ltd. and Contributors
|
2013-08-05 09:29:54 +00:00
|
|
|
# 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
|
|
|
|
2012-07-19 08:10:31 +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
|
2013-12-13 08:40:14 +00:00
|
|
|
|
2013-12-16 07:18:22 +00:00
|
|
|
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
|
2014-03-11 10:45:05 +00:00
|
|
|
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()),
|
2013-01-31 05:50:10 +00:00
|
|
|
login_manager.user=='Administrator' and '#8CA2B3' or '#1B750D')
|