WordPress Call To Undefined Function get_currentuserinfo() PHP Error

After uploading, installing and activation some plugins for WordPress blog publishing system, the plug-ins may cause the following PHP error message, logged by Apache web server error_log file or been displayed on web pages which looks like the following line:

Fatal error: Call to undefined function: get_currentuserinfo() in /wordpress/wp-content/plugins/plugin.php


To make matter worse, these plugins are working fine previously, and suddenly broken down or throwing out the error. The cause of the issue is due to the reason that get_currentuserinfo() function is defined within pluggable.php of WordPress core. The problem is that pluggable.php is only been loaded after all the plugins has been loaded. It means that get_currentuserinfo() is not yet available when plugins are triggering and needing the function.

To resolve the fix the “call to undefined get_currentuser() function error, just call pluggable.php prior to calling function the requires it. A little PHP programming skill is required, but for novice, it’s not hard to re-code the plugin source code to get the error solved.

Search for the get_currentuser in the PHP file which the error indicates having problem. Then copy and paste the following lines before (on top of) the line of get_current_user().

require(ABSPATH . WPINC . ‘/pluggable.php’);

Tip: It’s also possible substitute require with requice_once so that pluggable.php is unloaded once the get_currentuser() function is executed.

For example,

require (ABSPATH . WPINC . '/pluggable.php');
get_currentuserinfo();


One Response to “WordPress Call To Undefined Function get_currentuserinfo() PHP Error”

  1. Call to Undefined Function get_currentuserinfo() Error in WordPress » Tip and Trick
    October 28th, 2009 22:23
    1

    [...] Above trick does not work in new WordPress version, try the fix undefined function get_currentuserinfo() fatal error guide [...]

Leave a Reply

You can use these tags: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Subscribe to comments feature has been disabled. To receive notification of latest comments posted, subscribe to My Digital Life Comments RSS feed or register to receive new comments in daily email digest.
Custom Search

New Articles

Incoming Search Terms for the Article

Call to undefined function - undefined subscribe - call to undefined function php - Call to undefined function - fatal error undefined function - wordpress functions.php Call to undefined function - Call to undefined function get_currentuserinfo() - wordpress call to undefined function - megaupload undefined - Call to undefined function: - Fatal error: Call to undefined function get_currentuserinfo() - function last comments - how to call login functionality in wordpress - php undefined - pluggable.php wordpress core - y15 - Call to undefined function wordpress register page - Fatal error: Call to undefined function on line 157 wordpress - php undefined function but it's there - php function call problem - pluggable.php load wordpress - wordpress Call to undefined function get_currentuserinfo() - get_currentuserinfo upload.php problem - how to call a php function wordpress - wordpress call function - wordpress functions.php error - "php" "class" "Fatal error: Call to undefined function" - fatal error php call to function include - worpdress get_currentuserinfo() on plugin - Call to undefined function set php - undefined - apache wordpress Fatal error: Call to undefined function - "Call to undefined function read_global" - call undefined function load wordpress - call function on other server php - call a function in php - wordpress call - wordpress call a plugin - call a wordpress search - Call to undefined function remote pager() - load wordpress functions php - php function call wordpress - wordpress calling function - call function in wordpress - call function wordpress - editing wordpress theme undefined calls to php functions - How To Fix The “Call to undefined function: get_​currentuserinfo() - i have download a game Call to undefined function it give me fatal error - megaupload undefined error windows 7 - php undefinded function -