WordPress.org

Make WordPress Core


Ignore:
Timestamp:
04/08/2012 01:06:44 AM (9 years ago)
Author:
nacin
Message:

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.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/wp-includes/pluggable.php

    r20378 r20402  
    7575    global $current_user;
    7676
    77     if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST )
     77    if ( defined('XMLRPC_REQUEST') && XMLRPC_REQUEST ) {
     78        wp_set_current_user(0);
    7879        return false;
     80    }
    7981
    8082    if ( ! empty($current_user) )
Note: See TracChangeset for help on using the changeset viewer.