Don't fall back to logged in cookie if in the admin.
git-svn-id: http://svn.automattic.com/wordpress/trunk@12408 1a063a9b-81f0-0310-95a4-ce76da25c4cd
This commit is contained in:
parent
25015c0e0c
commit
6ae74dfd09
|
@ -99,7 +99,7 @@ function get_currentuserinfo() {
|
|||
return;
|
||||
|
||||
if ( ! $user = wp_validate_auth_cookie() ) {
|
||||
if ( empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
|
||||
if ( is_admin() || empty($_COOKIE[LOGGED_IN_COOKIE]) || !$user = wp_validate_auth_cookie($_COOKIE[LOGGED_IN_COOKIE], 'logged_in') ) {
|
||||
wp_set_current_user(0);
|
||||
return false;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue