• Resolved wearedigiwolf

    (@wearedigiwolf)


    Getting the below error currently – I have replaced the URL with mysite.com as it’s a business website. I came across a similar reference to it here but there is no solution.

    PHP Fatal error:? Uncaught Error: Call to undefined function _wp_get_current_user() in /var/www/mysite.com/html/wp-includes/pluggable.php:70\nStack trace:\n#0 /var/www/mysite.com/html/wp-includes/pluggable.php(1148): wp_get_current_user()\n#1 /var/www/mysite.com/html/wp-content/plugins/wp-optimize-premium/cache/file-based-page-cache-functions.php(36): is_user_logged_in()\n#2 [internal function]: wpo_cache()\n#3 {main}\n? thrown in /var/www/mysite.com/html/wp-includes/pluggable.php on line 70, referer: mysite.com

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Support vupdraft

    (@vupdraft)

    Can you try deactivating your other plugins and switching to a default theme to check if the issues persists.

    If it does not can you reactivate your themes/plugins one by one until you find the offending one?

    Got following error on screen trying to wp-admin the site. I was able to admin the site some months ago without problems. Probable cause is some automatic wordpress update to 6.0.3. but I am not the site owner.

    Fatal error: Uncaught Error: Call to undefined function wp_get_current_user() in /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/capabilities.php:693 Stack trace: #0 /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-content/plugins/groups/lib/access/class-groups-post-access.php(232): current_user_can(‘groups_admin_gr…’) #1 /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/class-wp-hook.php(307): Groups_Post_Access::posts_where(‘ AND dpge_posts…’, Object(WP_Query)) #2 /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/plugin.php(235): WP_Hook->apply_filters(‘ AND dpge_posts…’, Array) #3 /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/class-wp-query.php(2653): apply_filters_ref_array(‘posts_where’, Array) #4 /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/class-wp-query.php(3613): WP_Query->get_posts() #5 /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/post.php(2410): WP_Query->query(Array) #6 /home/clients/bf6d4b9a256cfc32 in /home/clients/bf6d4b9a256cfc32f6dd5832e4f280f3/dpge/wp-includes/capabilities.php on line 693

    The error does prohibit to admin the site. Backend impossible. The function causing the error on line 393 is checking current user capability to admin the site using the Groups plugin function : current_user_can(‘groups_admin_gr…’) since renaming the plugin through ftp from outside enables to admin the site.

    Hereby the 2 source lines #692 and #693 involved from capabilites.php :

    function current_user_can( $capability, …$args ) {
    return user_can( wp_get_current_user(), $capability, …$args );


    I tried to update the plugin but it did not change, throwing same error. Please help. Why is the wp_get_current_user() undefined at the moment ?

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Call to undefined function _wp_get_current_user()’ is closed to new replies.