mirror of
https://github.com/gosticks/wordpress-develop.git
synced 2026-08-11 20:30:23 +00:00
wp_set_current_user(0) for XMLRPC_REQUEST in get_currentuserinfo(). Ensures that wp_get_current_user() always returns a WP_User object. see #20372.
git-svn-id: https://develop.svn.wordpress.org/trunk@20402 602fd350-edb4-49c9-b593-d223f7449a82
This commit is contained in:
@@ -74,8 +74,10 @@ if ( !function_exists('get_currentuserinfo') ) :
|
||||
function get_currentuserinfo() {
|
||||
global $current_user;
|
||||
|
||||
if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
|
||||
if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) {
|
||||
wp_set_current_user(0);
|
||||
return false;
|
||||
}
|
||||
|
||||
if ( ! empty($current_user) )
|
||||
return;
|
||||
|
||||
Reference in New Issue
Block a user