Hide someone's ip (mask it) permanently

So I saw this somewhere else and it works perfectly.
Requires root access to xenforo files.

I did this on my own forum running 1.5 and it works fine.
  1. Browse to /library/Xenforo/ and open Visitor.php with your favorite code editor.
  2. Search for: public static final function getInstance() and right after $object = self::$_instance; add this:
    if (isset($object['user_id']) && in_array($object['user_id'], array(1, 2, 3))) { $_SERVER['REMOTE_ADDR'] = '';}
What this will do is when user ID 1, 2 and 3 browse the forums it'll add their IP address as on the databases instead of the real one.
This is good if you want to keep your IP masked from other administrators.

If you already logged in once and want to delete your existent IP on the database you'll need to run a SQL Query:
(don't forget to select the database first)
UPDATE xf_ip SET ip = '' WHERE user_id =1
Should be pretty simple. I don't know who the original creator of this idea/method is but I've rewritten it with my own words to be simpler to understand!

Similar threads

Similar threads