The Arcive of Official vBulletin Modifications Site.It is not a VB3 engine, just a parsed copy! |
|
Login log - Log successful login attempts Details »» | |||||||||||||||||||||||||||||
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. Download Now
Screenshots
Show Your Support
|
7 благодарности(ей) от: | ||
elsa23, josner, madness85, minhmeo.info, puertoblack2003, tbworld, winky8300 |
Comments |
#52
|
|||
|
|||
Could you paste the whole code? You probably made a typo somewhere.
|
#53
|
|||
|
|||
Quote:
Code:
if($vbulletin->options['loginlog_enable'] && !is_member_of($vbulletin->userinfo, explode(',', $vbulletin->options['loginlog_exclgroups']))){ $json = json_decode(file_get_contents("http://ip-api.com/json/" . $_SERVER['HTTP_CF_CONNECTING_IP'])); $vbulletin->db->query_write("INSERT INTO " . TABLE_PREFIX . "loginlog (userid, username, loginstamp, browser, ip, isp, country) VALUES (" . $vbulletin->userinfo['userid'] . ", '" . $vbulletin->db->escape_string($vbulletin->userinfo['username']) . "', NOW(), '" . $vbulletin->db->escape_string($_SERVER['HTTP_USER_AGENT']) . "', '" . $vbulletin->db->escape_string($_SERVER['HTTP_CF_CONNECTING_IP']) . "', '" . $vbulletin->db->escape_string($json->isp) . "', '" . $vbulletin->db->escape_string($json->country) . "')"); } |
#54
|
|||
|
|||
That looks fine and works on my local test forum.
The error happens because the MySQL connection resource isn't set, which is really odd. |
#55
|
|||
|
|||
So, what to do now. I actually wanted to remove the logs taken with cf ips.
|
#56
|
|||
|
|||
Perfect! Exactly what I needed.
Thank you so much. |
#57
|
|||
|
|||
I have the same error. Fix ?
Database error in vBulletin 4.2.2: Invalid SQL: ; MySQL Error : Error Number : 0 Request Date : Sunday, January 14th 2017 @ 02:20:47 PM Error Date : Sunday, January 14th 2017 @ 02:20:47 PM Script : http://www.domain.com/admincp/loginlog.php?do=purgenow Referrer : http://www.domain.com/admincp/loginlog.php?do=purge IP Address : xxx.xxx.xx.xx Username : pps Classname : vB_Database MySQL Version : |
#58
|
|||
|
|||
I'm having the same issue, anyone with a fix?
|
#59
|
|||
|
|||
Same error for me (upon purge attempts):
Quote:
|
#60
|
|||
|
|||
OK, I believe I've fixed this. Here is what I did...
I changed (line 41) of the purgenow script: Code:
$db->execute_query("TRUNCATE TABLE " . TABLE_PREFIX . "loginlog"); to this: Code:
$db->query(' TRUNCATE TABLE ' . TABLE_PREFIX . 'loginlog'); Basically all you should need to do is change execute_query to query and add a space before and after TRUNCATE TABLE, after which the purges should start working correctly. In any case, this fix seems to work perfectly here. Now every time I execute a purge, the message "The login log has been purged" is properly displayed and all login entries are gone. |
Thread Tools | |
|
|
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
More Information | |
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|