[wp-trac] [WordPress Trac] #43577: On multisite, fetch the current user via wp_get_current_user() returns empty roles array

WordPress Trac noreply at wordpress.org
Tue Mar 20 08:26:18 UTC 2018


#43577: On multisite, fetch the current user via wp_get_current_user() returns
empty roles array
--------------------------+------------------------------
 Reporter:  bretweinraub  |       Owner:
     Type:  defect (bug)  |      Status:  closed
 Priority:  normal        |   Milestone:  Awaiting Review
Component:  General       |     Version:  4.9.4
 Severity:  normal        |  Resolution:  worksforme
 Keywords:                |     Focuses:
--------------------------+------------------------------
Changes (by bretweinraub99):

 * status:  new => closed
 * resolution:   => worksforme


Comment:

 I've resolved the issue.

 The user in question was a network "Super Admin".   Thus, they had all
 site privileges, without actually having a site role as defined in the
 WP_User object returned from wp_get_current_user();

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


More information about the wp-trac mailing list