Question about AUTH_COOKIE and LOGGED_IN_COOKIE
-
I’d like to know the difference between AUTH_COOKIE and LOGGED_IN_COOKIE and when use one instead other.
Appreciate any help (sorry my bad english)
That is the why:
My plugin will make possible to users to access the admin area through a custom url. I have already writen the RewriteRules and these seems work fine.But the core takes me to login page every time I get to panel through the new url. The debug took me to wp_parse_auth_cookie() pluggable function.
I was taking a look at it and find the constants AUTH_COOKIE, SECURE_AUTH_COOKIE and LOGGED_IN_COOKIE, which seems be the cause to go back to login page.
The function that calls wp_parse_auth_cookie() is wp_validate_auth_cookie(), so I copied the wp_validate_auth_cookie() to my plugin and I changed the $scheme from AUTH_COOKIE to LOGGED_IN_COOKIE. Seems to choose LOGGED_IN_COOKIE stops the login’s loop.
That change can create some security problem?
- The topic ‘Question about AUTH_COOKIE and LOGGED_IN_COOKIE’ is closed to new replies.