Support » Plugins » Cookie Login data

Viewing 3 replies - 1 through 3 (of 3 total)
  • laqrhead


    Ok, so I think I’ve found the cookie name:


    where HASH is there seems to be a site specific hash. Anybody know what it is, or how I can get it outside wordpress? For the one site I can just copy it, but it won’t work on other sites.

    The values go like this I think:


    What is the middle value for?

    Anyways, I think I might be able to get by on this, but if anyone can provide more clues, I’d appreciate it.



    Ok, so I can get it from here.

    You can set the cookie name in the wp-config.php file by adding:

    define('LOGGED_IN_COOKIE', 'my_cookie_name');

    The default is defined in wp-settings.php on line 392 as:

    define('LOGGED_IN_COOKIE', 'wordpress_logged_in_' . COOKIEHASH);

    So now I’ll always know what the cookie name is, so I can extract the username from the cookie value. Something like this should do the trick assuming that you have established your DB connection.

    $sql="SELECT ID FROM wp_users WHERE user_login LIKE '$user_login'";

    If you have a better way, let me know.


    Did you ever get this to work!

    I am trying to do the same thing!

    I have been successful acquiring the $user_id through wp globals but it only works with IE not Sarfari or Firefox.

    So I then tried using the cookies but I have gotten the same results.

    If you got this to work correctly in all browsers I would sure love some help!


Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Cookie Login data’ is closed to new replies.