[wp-trac] [WordPress Trac] #20845: wp_set_current_user( null, "name") does not work when $current_user is already 0

WordPress Trac noreply at wordpress.org
Thu Oct 8 18:07:54 UTC 2015


#20845: wp_set_current_user( null, "name") does not work when $current_user is
already 0
-------------------------------------+---------------------------
 Reporter:  bobbingwide              |       Owner:  boonebgorges
     Type:  defect (bug)             |      Status:  closed
 Priority:  normal                   |   Milestone:  4.4
Component:  Users                    |     Version:  3.3.2
 Severity:  normal                   |  Resolution:  fixed
 Keywords:  has-patch needs-testing  |     Focuses:
-------------------------------------+---------------------------

Comment (by boonebgorges):

 Replying to [comment:17 bobbingwide]:

 > Good spot. Will there need to be a test where?
 > {{{
 > ID=3 user_login="three"
 > ID=4 user_login="3"
 > }}}
 >

 I don't think we need a separate case for that, since `$id` and `$name`
 are separate parameters. The only way they can be mixed up is by developer
 error, not by internal type mismatches.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/20845#comment:18>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list