Support » Plugins » View Registered Users’ IPs

  • I am looking for a plugin or hack that will allow me to see registered users’ IP addresses, preferably under the Authors & Users section of the Admin panel.

    A little background if necessary:
    Someone logged into the chat room of a site that I host for a teacher and announced that a test was cancelled. From the chat software, we have the IP address of the perpetrator and believe it to be a student that has registered as a normal WordPress user. If we can view the IP addresses of the users then we can determine whether or not it is someone that is registered, then see their name, email address, etc.

    Thanks in advance for any ideas you can offer!

    Katie

Viewing 3 replies - 1 through 3 (of 3 total)
  • If the user commented at all, then your Manage->Comments screen should show the IP address of all the commenters.

    WordPress doesn’t store any IP addresses in the users table at all.

    Here’s a quick plugin that will send an email to the blog admin every time someone logs in. This is the best I can do in a hurry:

    <?php
    /*
    Plugin Name: Login Emailer
    Plugin URI: http://www.skippy.net/blog/plugins/
    Description: sends an email to the blog admin every time someone logs in
    Version: 1.0
    Author: Scott Merrill
    Author URI: http://www.skippy.net/
    Released under the terms of the GNU GPL
    */
    add_action('wp_login', 'login_emailer');
    if (! function_exists('login_emailer')) {
    function login_emailer($login = '') {
    $ip = $_SERVER['REMOTE_ADDR''];
    $admin = get_userdata(1);
    mail($admin->user_email, "$login Logged In", "$login logged in from $ip at " . date('Y-m-d, h:i'));
    return $login;
    }
    }
    ?>

    Note: that’s totally untested.

    Thread Starter pibby

    (@pibby)

    Thanks Scott, I will definitely give that a try.

    Thread Starter pibby

    (@pibby)

    Plugin activates just fine once there is a slight edit to the code you provided:

    $ip = $_SERVER['REMOTE_ADDR''];

    Change to
    $ip = $_SERVER['REMOTE_ADDR'];

    There was an erroneous quote in there.

    Plugin works just great by the way, hopefully we will be able to track down the user now. Thanks again for your help!

    Katie

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘View Registered Users’ IPs’ is closed to new replies.