The MU forums have moved to

How to validate wordpress_logged_in outside WP (3 posts)

  1. fogster
    Posted 14 years ago #

    I'm trying to layer a couple non-PHP (Ruby on Rails, to be exact) pages on top of my current WPMU site. The pages won't do anything too fancy, but I need to know whether the user is logged in and, if so, be able to retrieve their user record in the database.

    I see that there's a cookie called wordpress_logged_in_ that can be read, but I can't find documentation on it. I understand that the cookie's value begins with a username and then has a has separated by a % sign. I don't want to trust the username at the beginning of the cookie; I'd like to use the hash for authentication. But I can't figure how the hash is generated. (I also have a straight-up "wordpress_" cookie which also has my username in the value.)

    Am I overlooking the documentation? And if there is no documentation around how the cookie is generated, can someone clue me into what the hash references?

    Many thanks,

  2. sporty
    Posted 14 years ago #

    Did you resolve this? I have a very similar issue, except with wordpress, rather than MU (but its practically the same approach I think), and for extra challenge, I have to read the cookie from and I assume validate or read the mysql database to validate?


  3. sits
    Posted 14 years ago #

    I'd also be interested in this if it is not possible to externally authenticate against a Wordpress user database.

About this Topic