[wp-trac] [WordPress Trac] #45990: Bug in function current_user_can prevents admin to access to Dashboard
WordPress Trac
noreply at wordpress.org
Sat Jan 19 13:01:17 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:
Severity: major | Resolution:
Keywords: reporter-feedback | Focuses:
------------------------------------+------------------------------
Comment (by DotMG):
Replying to [comment:2 pento]:
> Are you able to reproduce this issue with no plugins activated?
>
> Detailed steps to reproduce this bug would also be very helpful for
getting it fixed.
I could not reproduce the "bug", even with all plugins activated, once I
could get passed it by applying the fix I proposed in comment:1. That
means : {{{$current_user}}} was set, it was a {{{WP_User}}} object, but it
had {{{$current_user->ID}}} equal to 0.
The main issue here is the deadlock. Under an unknown circumstances, the
admin can login "successfully", but is not identified correctly as an
administrator, as {{{$current_user->ID}}} remains equal to 0. I'll be
looking at how {{{$current_user}}} is modified after user or admin login.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45990#comment:3>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list