[wp-trac] [WordPress Trac] #45990: Bug in function current_user_can prevents admin to access to Dashboard

WordPress Trac noreply at wordpress.org
Wed Jan 16 18:33:20 UTC 2019


#45990: Bug in function current_user_can prevents admin to access to Dashboard
------------------------------------+------------------------------
 Reporter:  DotMG                   |       Owner:  (none)
     Type:  defect (bug)            |      Status:  new
 Priority:  normal                  |   Milestone:  Awaiting Review
Component:  Login and Registration  |     Version:  trunk
 Severity:  major                   |  Resolution:
 Keywords:                          |     Focuses:
------------------------------------+------------------------------

Comment (by DotMG):

 Somewhat, {{{_wp_get_current_user()}}} in {{{wp-includes/user.php}}} was
 the problem here. I made the following change :

 {{{#!php
         #if ( ! empty( $current_user ) ) {
         if ( ! empty( $current_user->ID ) ) {
 }}}

 to finally manage to let the admin log-in and access to Dashboard. And I
 cancelled all other changes I've made (to capabilities.php, etc).

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


More information about the wp-trac mailing list