[wp-trac] [WordPress Trac] #45990: Bug in function current_user_can prevents admin to access to Dashboard
WordPress Trac
noreply at wordpress.org
Tue Jan 15 09:10:26 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 | Keywords:
Focuses: |
------------------------------------+-----------------------------
File : {{{wp-includes/capabilities.php}}}
method {{{has_cap}}} is not always defined for the Object
{{{$current_user}}}, and when this occurs, site Administrator cannot
access to Dashboard, because the function {{{current_user_can}}} returns
false.
The real bug is what caused the method has_cap to be absent for the object
{{{$current_user}}}, after a successful login. But this patch simply avoid
the calling of {{{has_cap}}} when it is not available.
--
Ticket URL: <https://core.trac.wordpress.org/ticket/45990>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform
More information about the wp-trac
mailing list