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

WordPress Trac wp-trac at lists.automattic.com
Tue Jun 5 14:34:34 UTC 2012


#20845: wp_set_current_user( null, "name") does not work when $current_user is
already 0
--------------------------+------------------------------
 Reporter:  bobbingwide   |       Owner:
     Type:  defect (bug)  |      Status:  new
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  Users         |     Version:  3.3.2
 Severity:  normal        |  Resolution:
 Keywords:                |
--------------------------+------------------------------

Comment (by bobbingwide):

 Note: The change in 3.4 was Revision 20410 for #20372

 I tried a simple workaround; set to "admin" first.

 wp_set_current_user( 1 );
 wp_set_current_user( null, "workaround-for-20845" );

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


More information about the wp-trac mailing list