[wp-trac] [WordPress Trac] #20372: WP_User::exists()
WordPress Trac
wp-trac at lists.automattic.com
Sun Apr 8 01:04:25 UTC 2012
#20372: WP_User::exists()
------------------------------+------------------
Reporter: markjaquith | Owner:
Type: enhancement | Status: new
Priority: normal | Milestone: 3.4
Component: Users | Version:
Severity: normal | Resolution:
Keywords: has-patch commit |
------------------------------+------------------
Comment (by nacin):
I looked at [3430] and wp_xmlrpc_server::login(). I feel like
get_currentuserinfo() should call wp_set_current_user(0) in the
XMLRPC_REQUEST branch. That would mean that wp_get_current_user() would
always return a WP_User object, which it does in literally every other
situation.
If wp_get_current_user() returns a non-existent user before login() runs
in XML-RPC, I think that's just fine. $current_user should never be null
after calling get_currentuserinfo().
I am going to commit this to avoid seeing the fatal error in trunk, but
open for discussion for what the best fix would be.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/20372#comment:6>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list