掲示板

Is it possible to record individual user log-in and log-out times?

14年前 に Dan Keiper によって更新されました。

Is it possible to record individual user log-in and log-out times?

New Member 投稿: 17 参加年月日: 09/04/29 最新の投稿
Hi,

Is there a mechanism in Liferay to let the admin know exactly who logged in and logged out and at what times? We need this historical information for account tracking.

I imagine I am not the first with this issue. Has anyone solved this? Ideas welcome.

Thanks
Dan
thumbnail
14年前 に Albert J Carter-Corbin によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

Regular Member 投稿: 123 参加年月日: 06/09/12 最新の投稿
You can enabled monitoring / user session tracking. I think login and logout information is stored there.

#
# Set the following to true to track user clicks in memory for the duration
# of a user's session. Setting this to true allows you to view all live
# sessions in the Admin portlet.
#
session.tracker.memory.enabled=true

#
# Set the following to true to track user clicks in the database after a
# user's session is invalidated. Setting this to true allows you to generate
# usage reports from the database. Use this cautiously because this will
# store a lot of usage data.
#
session.tracker.persistence.enabled=false
14年前 に Dan Keiper によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 17 参加年月日: 09/04/29 最新の投稿
Thanks Albert! Your answer got me going on the right path.

I ended up doing a bit more research and I found that to get what I needed I had to add the following properties in the portal-ext.properties file and restart the portal.

## Live Users
##
#
# Set this to true to enable tracking via Live Users.
#
live.users.enabled=true

#
# Set this to true to convert the tracked paths to friendly URLs.
#
session.tracker.friendly.paths.enabled=true

#
# Set the following to true to track user clicks in memory for the duration
# of a user's session. Setting this to true allows you to view all live
# sessions in the Admin portlet.
#
session.tracker.memory.enabled=true

#
# Set the following to true to track user clicks in the database after a
# user's session is invalidated. Setting this to true allows you to generate
# usage reports from the database. Use this cautiously because this will
# store a lot of usage data.
#
session.tracker.persistence.enabled=true

I then find in the usertrackerpath table entries like
| 5 | 2 | /web/guest/home | 2009-07-29 16:44:05 |
| 6 | 2 | /portal/logout?null | 2009-07-29 16:44:41 |

where the userTrackerId ( the second column - which is a 2 in this case) corresponds to the userTrackerId in the usertracker table.

I appreciated the quick feedback.
Thanks again.
Dan
thumbnail
14年前 に Albert J Carter-Corbin によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

Regular Member 投稿: 123 参加年月日: 06/09/12 最新の投稿
No Problem. Glad I could point you in the right direction.
14年前 に metilmarket newell kanavaro によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 12 参加年月日: 09/08/03 最新の投稿
Hi Dan Keiper

i follows by your article to edit the portal-ext.properties , but when i start up loging with liferay on the web browser. and i look for the

/web/guest/home folder . But i didn't find the /web/guest/home folder as you mention .

Could you give properly path that the folder given.

thanks

/web/guest/home
/portal/logout?null
14年前 に Dan Keiper によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 17 参加年月日: 09/04/29 最新の投稿
Hi,

The logging of the user’s activity is not contained in a file system directory but is actually in the lportal database. So I don’t think you actually want to find the directory you ask about. I think you want to find the logged information which is in the lportal database stored in the usertrackerpath table.

In my previous post I state:

>>I then find in the usertrackerpath table entries like
>>| 5 | 2 | /web/guest/home | 2009-07-29 16:44:05 |
>>| 6 | 2 | /portal/logout?null | 2009-07-29 16:44:41 |
>>
>>where the userTrackerId ( the second column - which is a 2 in this case) corresponds to the userTrackerId in the usertracker table.

I used standard SQL select statements (I am using mysql database) to retrieve that row information shown. In the future I plan to have to write something later to actually extract what I need programmatically.

After you log on to your database, here are the statements I used to make the correlation were.

mysql>use lportal;
mysql>select * from usertracker;
mysql>select * from usertrackerpath;


in my example information found above for table row 5 and 6, "web/guest/home" and "portal/logout?null" refer to the URLS visited by userTrackerID number 2 along with the timestamp.

Hope this helps.
Dan
14年前 に metilmarket newell kanavaro によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 12 参加年月日: 09/08/03 最新の投稿
Hi Dan Keiper

thank your reply.

i am just find the logged information into the portal database stored in the usertrackerpath table. But i have the question to share with you.

If i have want recording all actions of user like visit to post something, view something ,downloading something use what application

interact with any portlet in liferay. Does it possible ?

Does it need creating extract column in usertrackerid, usertrackerpath or create another table ?

Look at the usertrackerpath ,usertrackerid tables , i didn't find down the column having content or summary message of user

post ,view and download somthing to stored in database.

On the other hand, if Liferay doesn´t have these facilities. please help me to find out where should I write my code.

I need to help from you share the infomation and knowledge to do that.


thank regards
14年前 に Dan Keiper によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 17 参加年月日: 09/04/29 最新の投稿
Hello again,

As I am unable to answer your questions specifically, I am asking the forum to chime in and help you. Sorry, I have not dug deeply into this arena.

In general I would think/guess that you would have to do some account maintenance yourself about specific things like downloads that occur as folks traverse your portal. It would be up to you to decide how to store and eventually retrieve that info.

That being said, there may be something more generic that you can use. I hope someone can help you.
14年前 に Dmitry Babain によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

Regular Member 投稿: 238 参加年月日: 08/11/23 最新の投稿
You'll have to write some code, i believe.
We wanted to store information about files and folders in document library accessed by user, so corresponding hooks were developed.
They store information about access in a custom db table.

We have not found a way to get information about user actions and access to resources in one centralized place. May be you'll be lucky.

As an alternative, you can check the code that works with permission checking, as that is the place where most user interactions pass through.
14年前 に metilmarket newell kanavaro によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 12 参加年月日: 09/08/03 最新の投稿
Hi Dmitry Babain .

Thank all


Could you tell me more detail about checking code that works with permission checking ?

Where can i check in the source code? what can i check ?

Can you given the specific path in the source code ?

i am intend writing the code by my own to track user's event that he/she is interact with the liferay.

Such as :he/she licks on the images , hyperlinks . we get tracking information of images and links to store temporary in the database table.

I need everyone given the right direction.


thank regards

thank all
thumbnail
13年前 に Namrata Hangal によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

Regular Member 投稿: 161 参加年月日: 10/07/27 最新の投稿
Hi,

I was looking for an answer to user login related logging, and this thread helped me.
What I wanted to know is, are the login related messaged displayed in the server log file like catalina.out?

Also, I would like to know if the following are possible:
1) audit logging & configuring the level of audit
2) usage traffic tracking and reporting

Appreciate any headway!

Regards.
6年前 に Thien Nguyen によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 8 参加年月日: 17/04/24 最新の投稿
hi all
I want to know which user created user next?
I can go to any table to see???
thank you all,good luck!!!
6年前 に Thien Nguyen によって更新されました。

RE: Is it possible to record individual user log-in and log-out times?

New Member 投稿: 8 参加年月日: 17/04/24 最新の投稿
hi Albert J Carter-Corbin , Dan Keiper!!
## Live Users
##
#
# Set this to true to enable tracking via Live Users.
#
live.users.enabled=true

#
# Set this to true to convert the tracked paths to friendly URLs.
#
session.tracker.friendly.paths.enabled=true

#
# Set the following to true to track user clicks in memory for the duration
# of a user's session. Setting this to true allows you to view all live
# sessions in the Admin portlet.
#
session.tracker.memory.enabled=true

#
# Set the following to true to track user clicks in the database after a
# user's session is invalidated. Setting this to true allows you to generate
# usage reports from the database. Use this cautiously because this will
# store a lot of usage data.
#
session.tracker.persistence.enabled=true



not working with me
i using sql:
select * from usertracker;
select * from usertrackerpath;

but it nothing!!! emoticon