[wp-trac] [WordPress Trac] #20372: WP_User::exists()

WordPress Trac wp-trac at lists.automattic.com
Mon Apr 9 22:01:09 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 ryan):

 In [20410]:
 {{{
 #!CommitTicketReference repository="" revision="20410"
 When fetching the user in get_currentuserinfo(), make sure it is a valid
 WP_User object. If it is stdClass, upgrade it to WP_User. If it is
 WP_Error, an int, or anything else, set the current user to ID 0.

 In wp_set_current_user(), return the current user global only if it is a
 WP_User object. If it is not, fall through and go about setting it up
 properly.

 Formatting cleanups for both functions.

 see #20372
 }}}

-- 
Ticket URL: <http://core.trac.wordpress.org/ticket/20372#comment:11>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software


More information about the wp-trac mailing list