News:

Bored?  Looking to kill some time?  Want to chat with other SMF users?  Join us in IRC chat or Discord

Main Menu

User Activities

Started by vostro1400, October 13, 2018, 10:13:34 AM

Previous topic - Next topic

vostro1400

Is there a way or mod to pull/download users activities or login activities.

I want to pull my users activities.. data showing how many times users login..

No way. options to get such data from admin panel.. But such is available in DB...but the login times is showing in millions EG 12000090

Any idea plz share

Aleksi "Lex" Kilpinen

Why?

And the activity you can find from the DB is just their last activity, the same you can see from their profile. SMF doesn't keep tabs on users much more than that.
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Arantor

It does in 2.1, you can keep history for 30 days by default of when users log in.

Though I would ask the question of why it would be of use to have more than that.

Aleksi "Lex" Kilpinen

Oh, I actually was not aware of that - and I still  wonder why exactly, I can see a reason to keep 2 login times, to let the user know their last login before current one, but more than that?
Slava
Ukraini!


"Before you allow people access to your forum, especially in an administrative position, you must be aware that that person can seriously damage your forum. Therefore, you should only allow people that you trust, implicitly, to have such access." -Douglas

How you can help SMF

Arantor

Could be useful if you have a suspicion of an account being hacked.

shawnb61

Quote from: vostro1400 on October 13, 2018, 10:13:34 AM
But such is available in DB...but the login times is showing in millions EG 12000090

The timestamps are in the unix format (milliseconds since 1970 in GMT/UTC...), & need to be converted to be readable.

Online tool & explanation here:
https://www.epochconverter.com/

Or use this PHP function in your code:
http://php.net/manual/en/function.date.php

Be mindful of timezones...   
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

Arantor

FYI the DB is not in milliseconds, just in seconds.

shawnb61

Quote from: Aleksi "Lex" Kilpinen on October 13, 2018, 10:15:41 AM
And the activity you can find from the DB is just their last activity, the same you can see from their profile. SMF doesn't keep tabs on users much more than that.

If you need more detail, that would be in your web access logs.  Your host probably provides access to those in cPanel. 

Depending on your forum volume and how far back you want to go, you may even be able to just load the log into Excel.  I find that telling Excel I'm importing a space-delimited file works great.  As long as I don't have more than 1000000 rows...  The logs are very detailed.  I can only load about 1 week of activity into Excel.  This works great for one-time analyses. 

Again, depends on your purpose. 
Address the process rather than the outcome.  Then, the outcome becomes more likely.   - Fripp

vostro1400

thank you guys for the input. We are running SMF as intranet for local resources. Now since the implementation most of the staffs claimed to be using it for the daily routine. As such the mgt wanted to know how active they are. But the issue is that the Admin does not have the function to export user activity log.

However, I'm able to find that in DB. Since the way to view the data in batch in admin.. I will be viewing it in DB and export in excel. So is there any mod that can be installed in Admin that we will provide such info.. Rather than going to DB

Advertisement: