News:

Wondering if this will always be free?  See why free is better.

Main Menu

Track User Logins

Started by margarett, July 22, 2014, 12:13:29 AM

Previous topic - Next topic

margarett

Link to Mod





Track User Login

This MODification allows you to record the user logins so that they can be traced. Useful if a user thinks his account has been compromised.

There is a pruning function that removes each user's records older than 30 days. This will prevent the records table to grow too much and runs as a scheduled task.

Languages:
     - English

Changelog

Version 1.1 // 19-09-2014
================================================================================
+ Added pruning function that removes records older than 30 days
+ User IP is also stored
! Fixed some language strings

Version 1.0 // 11-07-2014
================================================================================
+ First release

Legend:
--------------------------------------------------------------------------------
! Minor change or bugfix.
+ Feature addition or improvement.
- Feature or option removal.


Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Does it reuse the same table structure 2.1 does for a clean upgrade?

margarett

Only by a long shot :P I didn't really back port this from 2.1 (TBH I didn't even knew this existed in 2.1 :( )

Will look into it for a next release ;) Thanks
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Arantor

Yup, it's one of the many pretty-much undocumented things in 2.1 and might not even work properly but never mind...

Masterd

It would make more sense if you use $txt['trackLogins'] = 'User Logins/Logouts'; instead of $txt['trackLogins'] = 'User Logins';.

margarett

You're right. That's because it started as just user logins and then evolved :P
I'll update that in next version, thanks ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Masterd

Quote from: margarett on July 22, 2014, 05:39:35 PM
You're right. That's because it started as just user logins and then evolved :P
I'll update that in next version, thanks ;)

That's what I'm here for. ;)

Psst, don't forget to update all language strings.

Ninja ZX-10RR

Any updates for this? I would really like to install this one but first I would like the pruning system to be done and customizable through admin settings >_<
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Not really... I'm totally out of time :(
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

:O :'( is it really that hard to do that prune function? D:
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Theoretically not :P
A scheduled task, a configurable number of days in ModSettings and it should be it ;)
It still needs to be coded :P
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

*begs margarett to find the time for it* ♥
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Ninja ZX-10RR

A month is passed now :( tiny bump? :'(
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Yeah thank you for reminding me ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

br360

Just out of curiosity; does this mod record the different ip's a user may have every time they log in as well?

margarett

Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

br360

Now that would be awesome, and something I've been looking for for a while.

Ninja ZX-10RR

Quote from: margarett on September 09, 2014, 10:10:46 PM
Yeah thank you for reminding me ;)
You're welcome :P

Quote from: br360 on September 09, 2014, 10:14:01 PM
Just out of curiosity; does this mod record the different ip's a user may have every time they log in as well?
Indeed it could be another useful tweak, I quote you on that one dude. If it's possible without spending tons of hours for it... ;) Also some settings about the db table size would be *extremely* useful...
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Finally looking at this (taking a break from converters :P )
IP is already stored, pruning is coming shortly :) Need a few more days to properly test it :)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

That is just... AWESOME!!! :D I will be the first one to download the new version as soon as it will be updated! ;) Ofc I'll report any errors (if any).
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

br360

Thanks Margarett. The recorded IP address each time a member logs in will definitely help track some of the more problem members (trolls/sock puppets,etc.).

Awesome indeed.


Ninja ZX-10RR

Plus, it could be *extremely* useful to detect shared accounts ;)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

So, I updated the MOD. Please let me know if you have any suggestions ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

br360

Works great margarett-awesome job.

I did notice though that on the first page of this support topic it says that it prunes the logs every 30 days- but when going into the task scheduler, it has it pruning every day by default. No biggie as obviously one can just change the time to run the task.

This will come in handy, so thanks again. :)

margarett

No... The task runs daily. But it removes any records older than 30 days ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

YEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEEAAAAAAAAAAAAH you just made my day :D
Just a suggestion... Would it be possible to get rid of the Cloudflare logins? See attached image to have an idea. I have a CF mod working on my forum and also Bad Behaviour with reverse IP enabled to get the real IP addresses.

That pruning is just.. *-* ... _ can I just stare at it?
Is it configurable then? I set it to run every week thinking it would have been deleting all entries older than one week XD

Ah don't try to edit that big red text as it expresses my happyness :D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

br360

Quote from: margarett on September 18, 2014, 08:38:02 PM
No... The task runs daily. But it removes any records older than 30 days ;)

Ah, good to know. LOL, I just ran the scheduled task, and the records still showed in the profile. At least now I know why. :)

margarett

Quote from: ♦ Ninja ZX-10RR ♦ on September 18, 2014, 08:39:46 PM
Would it be possible to get rid of the Cloudflare logins?
You mean don't record when there's a certain IP? Or to get the real IP behind CF?

Quote from: ♦ Ninja ZX-10RR ♦ on September 18, 2014, 08:39:46 PM
Is it configurable then? I set it to run every week thinking it would have been deleting all entries older than one week XD
ATM not. The task runs once a day. Every day it removes entries older than 30 days (relating to each day it runs, of course :P ) and that's it. If you want to change the 30 days, it has to be done in ScheduledTasks.php:
//limit date to remove. 30 days for now, maybe next version has a setting for it ;)
$limit_date = time() - 30 * 86400;

That "30" is the number of days ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

I already get the IP behind CF (as shown in the pic) I would just like to get completely rid of the line telling me that my cookie logged in behind CF since it only spams the list. :)
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

So you don't want to record ANY cookie login? Or just don't want to record a cookie login that comes from a certain IP? I'm sorry, I've never used CF so I don't really understand how it works.
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

No I want to record cookie logins but with the correct forwarded IP, and it doesn't happen :/ it shows CF IP in that case, dunno why.
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

margarett

Ah, ok. I'll see if I can check where that mod puts the real IP ;)
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Ninja ZX-10RR

Take your time, no rush as it's already awesome like this ;) thanks anyway :D
Quote from: BeastMode topic=525177.msg3720020#msg3720020
It's so powerful that on this post and even in the two PMs you sent me,you still answered my question very quickly and you're apologizing for the delay. You're the #1 support I've probably ever encountered man, so much respect for that. Thank you, and get better soon.

I'll keep this in my siggy for a while just to remind me that someone appreciated what I did while others didn't.

♥ Jess ♥

STOP EDITING MY PROFILE

Chalky

#33
Margarett, since I installed the latest version of this mod yesterday I keep getting this error generated by all members:

QuoteUnknown column 'ip' in 'field list'
File: /home/..../Sources/Subs-TrackLogins.php
Line: 39

To the user it delivers a blank white screen with the error "Unknown column 'ip' in 'field list'"in the top corner.  Refreshing the page the forum comes back and acts normally.  I did have the first version of the mod installed to begin with, with no problem, but I uninstalled it yesterday, did not opt to delete the associated data and installed the new version.

Edit:  Actually, it's worse than that.  See attached.  I'm going to try uninstalling the mod again and let it delete the data this time, then try installing it again....

margarett

Ups I forgot to add that detail... It is necessary to delete associated data at uninstall or else the new column in log_logins table isn't created...
Anyway you can fix that now by going to phpmyadmin, forum database, SQL tab and run this query:
ALTER TABLE smf_log_logins ADD ip VARCHAR( 20 ) NULL DEFAULT NULL ;
(of course, check for correct prefix ;) )
Se forem conduzir, não bebam. Se forem beber... CHAMEM-ME!!!! :D

QuoteOver 90% of all computer problems can be traced back to the interface between the keyboard and the chair

Chalky

Wow, that was super-quick!!!  I was still backing everything up before I tried anything so hadn't had chance to break anything yet  :P   Fix works perfectly, thanks margarett 

Arantor

Yeah, this has been an issue since 2.0 RC3 or 4 if I remember rightly.

Take a look at SimpleDesk's installer sometime, it might be useful; all the tables are declared in an array and then the array is shoved at add-column too just in case.

Debbie3

Hi
I just installed the mod Track User Logins  I am using Vertex Theme. I can't seem to find where it installed to and where the logs are.

Please advise.
Thank you

-Rock Lee-

@margarett Very good here I leave the translation to the Latin Spanish so can be appreciated by more languages: D

Profile.spanish_latin-utf8.php
$txt['trackLogins'] = 'Inicio de sesión/Cierre de sesión de usuarios';
$txt['trackLogins_by'] = 'Compruebe los registros de conexión/desconexión por';
$txt['trackLogins_nodata'] = 'No hay nombres de usuarios / cierres de sesión se registraron para este usuario';
$txt['trackLogins_login'] = 'Manual de Inicio de sesión';
$txt['trackLogins_cookie'] = 'Auto (cookie) de sesión';
$txt['trackLogins_logout'] = 'Cerrar sesión';
$txt['trackLogins_action'] = 'Acción';


and Profile.spanish_latin.php
$txt['trackLogins'] = 'Inicio de sesi&oacute;n/Cierre de sesi&oacute;n de usuarios';
$txt['trackLogins_by'] = 'Compruebe los registros de conexi&oacute;n/desconexi&oacute;n por';
$txt['trackLogins_nodata'] = 'No hay nombres de usuarios/Cierres de sesi&oacute;n se registraron para este usuario';
$txt['trackLogins_login'] = 'Manual de inicio de sesi&oacute;n';
$txt['trackLogins_cookie'] = 'Auto (cookie) de sesi&oacute;n';
$txt['trackLogins_logout'] = 'Cerrar sesi&oacute;n';
$txt['trackLogins_action'] = 'Acci&oacute;n';


ManageScheduledTasks.spanish_latin-utf8.php
$txt['scheduled_task_pruneTrackLogins'] = 'Borrar pista de inicio de sesión/Cierre de sesión de usuarios';
$txt['scheduled_task_desc_pruneTrackLogins'] = 'Elimina los registros antiguos de la tabla de MODificación';


ManageScheduledTasks.spanish_latin.php
$txt['scheduled_task_pruneTrackLogins'] = 'Borrar pista de inicio de sesii&oacute;n/Cierre de sesii&oacute;n de usuarios';
$txt['scheduled_task_desc_pruneTrackLogins'] = 'Elimina los registros antiguos de la tabla de MODificacii&oacute;n';



Regards!

PD: Whatever you need, call me ;)
¡Regresando como cual Fenix! ~ Bomber Code
Ayudas - Aportes - Tutoriales - Y mucho mas!!!

aegersz

I have checked my Task Log and the Prune Track User Logins/Logouts is not being logged yet i have it set to run daily - what could be wrong ? I have the 1.1 version installed.

I have even tried to run it manually but it still doesn't appear in the log.

However, my Logins/Logouts list does goes back less than 30 days so i guess it's working ok.
The configuration of my Linux VPS (SMF 2.0 with 160+ mods & some assorted manual tweaks) can be found here and notes on my mods can be found here (warning: those links will take you to a drug related forum). My (House) music DJ dedication page is here

Kiriakos GR

I have this mod installed for over a year, but I never shown interest to check other fields other than User IP.

Today I did notice something strange.
User name » Track User » Profile Edits

Please see the attachment and blue arrow.   
Original User name this is not " Deleted User ".

I am now assuming that possibly this mod was never correctly programed so to record at this field a specific user name.



Shambles

Is "Job title" a profile field that is completed during member registration?

If so, it's possible the information supplied is initially being recorded against a member ID that changes when the new member record is created.

Kiriakos GR

Quote from: Shambles on May 03, 2018, 01:01:19 PM
Is "Job title" a profile field that is completed during member registration?

Yes it is obligatory profile field at every new registration, my forum this serves specialized professionals.

Quote from: Shambles on May 03, 2018, 01:01:19 PM
If so, it's possible the information supplied is initially being recorded against a member ID that changes when the new member record is created.

If I am translating correctly your though,  you are saying that if this field was filled after a new member registration, the description of member ID this it would be know at the SMF engine.

Well in my case, any New Member registration this pass from  Administrator approval. 
All inserted new member information's among their "Job title" they must be reviewed and approved, prior they become Full members.



   

Shambles

I agree that the ID of the new member should be known, but there's something wrong at the registration page that initially allocates an ID that is not what the member eventually ends up with.

Every member on my forum has the very same issue - I just learned to live with it over the past 8 years ;)





Kiriakos GR

Quote from: Shambles on May 03, 2018, 01:50:58 PM

Every member on my forum has the very same issue - I just learned to live with it over the past 8 years ;)

In my case I just reported the problem, your confirmation helps in the regard of higher number of collected evidences  :)
If the person which wrote this mod can make it perfect, this would be good news.

Shambles

QuoteIf the person which wrote this mod can make it perfect...

Bruno (margarett) hasn't been on here for a long time, so don't hold your breath.

Kiriakos GR

I am not holding my breath.
I have the awareness that I resurrected a topic silent since 2014.

Shambles

Quote from: Kiriakos
I have the awareness that I resurrected a topic silent since 2014.

It's a modification support topic - it has no "use by date" and can be resurrected whenever required ;)

Advertisement: