Version: 4.1, by Dave
Developer Last Online: Aug 2021
Category: Administrative and Maintenance Tools -
Version: 4.x.x
Rating:
Released: 05-27-2014
Last Update: 01-15-2016
Installs: 39
DB Changes Uses Plugins
Re-useable Code
No support by the author.
Hi,
This plugin will allow you to log all successful login attempts of all users.
This can be useful to see if users share their account or if the account of someone got hijacked. Usernames and IP addresses can be clicked.
It will log the following
- Userid
- Username
- IP
- ISP (Internet Service Provider)
- Country
- HTTP user agent
Settings:
- Enable/disable the product.
- Exclude usergroups from being logged.
- Purge the logs.
Picture
Installation
1. Download the .zip file specified.
2. Upload the contents of the upload folder to the root of your forum.
3. Import the product with the .xml file in the import folder.
Note
The script will log using the current time on the server, in case there's a difference between the server time and your local computer time, you can change the offset in the loginlog.php script on line 12.
Also keep in mind that the country and/or ISP resolving might not be 100% accurate and that it might show no value in the logs.
Credits Telize.com its API is being used to get the ISP and country off the IP address.
Let me know if it works well.
Changelog
11 June 2014 V4: Added the table_prefix global to the login hook.
5 June 2014 V3: Fixed searching only showing the last 25 entries. Pagination will now work as intended.
30 May 2014 V2: Changed hook location, added enable/disable setting and a setting to exclude usergroups.
28 May 2014 V1: Fixed a little mistake with the filter.
Does your MySQL user have access to the TRUNCATE function?
The query itself is correct to truncate the table.
I will fix the other error if you search for nothing, although it doesn't have any priority.
hmm ... not sure exactly how to check access to the truncate function
but running 'show grants' from the mysql command line for the user says:
GRANT ALL PRIVILEGES ON ...WITH GRANT OPTION
===============================
EDIT
running this manually from command line worked :
TRUNCATE vb_loginlog;
but using the loginlog control panel purge function just gives the first error above - like it's not getting any input
I changed loginlog.php to use "query_write" vs. "execute_query" and it seems to work now
not sure if this is proper way to use it though ...i'm only a former sysadmin and not much of a programmer
hmm ... not sure exactly how to check access to the truncate function
but running 'show grants' from the mysql command line for the user says:
GRANT ALL PRIVILEGES ON ...WITH GRANT OPTION
===============================
EDIT
running this manually from command line worked :
TRUNCATE vb_loginlog;
but using the loginlog control panel purge function just gives the first error above - like it's not getting any input
Already did that sir, Still shows cloudflare IP's.
I've altered the loginlog plugin so it logs in mostly all places on the forums (forumhome/forumdisplay), but after a while the loginlog.php is taking ages to load. Is there a way that this system logs on all pages, and "only" logs new information of a user when either the browser OR ip of that user has changed?
I've altered the loginlog plugin so it logs in mostly all places on the forums (forumhome/forumdisplay), but after a while the loginlog.php is taking ages to load. Is there a way that this system logs on all pages, and "only" logs new information of a user when either the browser OR ip of that user has changed?
Yea that is possible. A matter of selecting the latest record of the user and compare the IP/browser with the current one, then if there's a mismatch you just log the entry.
I do not trust any external content, can you make a version without it please? Thank you.
It makes a call to a third party API to get certain information about the IP address such as the ISP/country, etc. I'm not going to make it dependent of nginx/Apache modules so sorry, it will remain as it is. But really, it's no big deal.
Most of the time, it may not be big deal indeed, but it's a different story on privacy aware websites. That would violate our current privacy policy.
The API I use is open-source so you could simply integrate it on your own server and change the API URL I call in the script to your own local URL. https://github.com/fcambus/telize