reading WP login cookies from other scripts
-
I’d like use the WP user enrollment/login infrastructure on my website on pages outside of my WP blog. So, basically I need to read WP cookies to see if a user is logged in.
I’m sure it would be easier in PHP and use all WP functions, but I’d like to use Perl if possible because that’s what my other pages are written in.
What I do now is check for a cookie with name “wordpressuser_<longstring>”. If none exists, they are not logged in. If I find one, then read that cookie’s value as the user_login. I think that sort of works, but doesn’t check the password, so it seems totally unsecure. I can read the value of the other cookie “wordpresspass_<longstring>”, which is a long string of characters which I assume I have to check against the user_pass in the wp_users MySQL table, but not sure how.
Can someone give me a clue on how to (fairly) securely read the cookies to see who is logged in?
- The topic ‘reading WP login cookies from other scripts’ is closed to new replies.