![]() |
Logging IP Addresses - is there a mod for this?
I have a member who thinks his account has been accessed by someone else. He's been a member for several years and has never posted so only one IP address shows in his account profile. I'm assuming that vB only logs IPs when a user posts (please correct me if I'm wrong).
Is there a mod, or any way to view IPs that have accessed an account over a certain period of time? Any assistance would be truly appreciated. Thanks! Using 3.8.6 btw :) |
I was going to use this for something I was working on: create a plugin with hook location global_complete and this code:
Code:
if ($vbulletin->userinfo['userid'] AND $vbulletin->session->created) In any case, this logs the user name, id, and ip whenever a session is created. You would probably want to add the data/time to this. Note: I think this will be OK but I didn't try it on a busy site. I also don't know if the info might somehow already be available from the web server logs. ETA: of course you could also add a check for the userid if you only want to log that one user. |
Thank you kh99. That is a very useful code.
|
Thank you very much for this code.
--------------- Added [DATE]1353004307[/DATE] at [TIME]1353004307[/TIME] --------------- Same thing with timestamps added, Code:
if ($vbulletin->userinfo['userid'] AND $vbulletin->session->created) |
Very useful, thanks guys! Any obvious changes needed for it to work on vB4?
|
One thing I noticed with this, is that it only adds it to one line, there is no carriage return after each entry.
--------------- Added [DATE]1382216131[/DATE] at [TIME]1382216131[/TIME] --------------- Got it, needed to add \r |
All times are GMT. The time now is 11:19 AM. |
Powered by vBulletin® Version 3.8.12 by vBS
Copyright ©2000 - 2025, vBulletin Solutions Inc.
X vBulletin 3.8.12 by vBS Debug Information | |
---|---|
|
|
![]() |
|
Template Usage:
Phrase Groups Available:
|
Included Files:
Hooks Called:
|