Call to Undefined Function get_currentuserinfo() Error in WordPress调用未定义函数get_currentuserinfo()错误在WordPress

In WordPress在WordPress blog publishing博客出版 system, there may be error been logged in Apache web server error_log file or been displayed on web pages which looks like the following line:系统,可能有错误被记录在Apache Web服务器error_log文件或网页上已经像下面这行看起来显示:

Fatal error: Call to undefined function: get_currentuserinfo() in /wordpress/wp-content/plugins/plugin.php致命错误:调用未定义的函数:get_currentuserinfo()在/ WordPress的/可湿性粉剂内容/插件/ plugin.php


The undefined get_currentuserinfo function error normally happens in a poorly coded plugin.未定义get_currentuserinfo函数的错误通常发生在编码插件欠佳。 If the user deactivate the plug-in that causes the error, the issue will be fixed, resolved and go away.如果用户停用插件,导致错误,这个问题将是固定的,解决和消失。 The error happens because $userdata or $user_id global variables become null, not defined or of empty value after the plugin is initiated, included, hooked and loaded.错误发生,因为用户数据或$ $ user_ID的全局变量成为空,没有定义或空值后,启动插件,包括上钩,加载。

The User ID and User Data (which User ID is part of) is globally-available var when in the WordPress admin pages.用户ID和用户数据(即用户名的一部分),是全球可用的无功时,在WordPress管理页面。 To resolve and fix the undefined get_currentuserinfo() function error, reset and scope the variable to global in the plugin before the beginning of the function which calling get_currenctuserinfo().要解决和确定未定义get_currentuserinfo()函数错误,复位和范围在插件变量全球前函数调用get_currenctuserinfo开始()。

To set $userdata or $user_id vars to global scope, add in one of the following line into the beginning of the plugin PHP file:要设置用户数据或$ $ user_ID的瓦尔全球范围内,在下列行一个添加到插件的PHP文件的开头:

$userdata = $GLOBALS['userdata']; $用户数据= $全局['用户数据'];

or,或,

global $userdata;全球$用户数据;

For user id, use “global $user_id;” instead.对于用户名,请使用“全球$ user_ID的;”代替。

Update: Above trick does not work in new WordPress version, try the更新:以上伎俩无法在新的WordPress版本,请尝试 fix undefined function get_currentuserinfo() fatal error修复未定义函数get_currentuserinfo()致命错误 guide instead.指南,而不是。

IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. 重要说明 :您正在阅读的翻译网页,其中提供“按原样”不附带任何一台机器。 Unlike human translation, machine translation does not understand the grammar, semantics, syntax, idioms of natural language, thus often produce inaccurate and low quality text which is misleading and incomprehensible.不像人类翻译,机器翻译不明白的语法,语义,句法,成语自然语言,因此,往往产生不准确的和低质量文本,是误导和令人费解。 Thus, please refer to因此,请参阅 original English article英文原版的文章 when in doubt.当怀疑。



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> 您可以使用这些标记:<a title="">的title=""> <acronym title="">的首字母的<b> <blockquote cite=""> <cite>的<code>“删除日期=“”“<em>的<i> <q cite=""> <strike>的<strong>

Subscribe to comments feature has been disabled. 订阅功能已被禁用的意见。 To receive notification of latest comments posted, subscribe to 收到最新意见的通知张贴,订阅 Tip and Trick Comments RSS feed 小费和计谋评论RSS饲料 or register to receive 注册以接收 new comments in daily email digest. 在每日电子邮件摘要中新意见。
Custom Search

Incoming Search Terms for the Article接踵而来的查寻期限为文章

Call to undefined function get_currentuserinfo() 调用未定义函数get_currentuserinfo() - - get_currentuserinfo get_currentuserinfo - - Fatal error: Call to undefined function get_currentuserinfo() 致命错误:调用未定义的函数get_currentuserinfo() - - wordpress get_currentuserinfo WordPress的get_currentuserinfo - - Call to undefined function get_currentuserinfo()调用未定义函数get_currentuserinfo() - - get_currentuserinfo() get_currentuserinfo() - - Call to undefined function get_currentuserinfo调用未定义函数get_currentuserinfo - - get_currentuserinfo wordpress get_currentuserinfo WordPress的 - - Call to undefined function wordpress未定义的函数调用的WordPress - - Call to undefined function: get_currentuserinfo()未定义的函数调用:get_currentuserinfo() - - "Call to undefined function get_currentuserinfo()" “召唤未定义函数get_currentuserinfo()” - - undefined function get_currentuserinfo未定义的函数get_currentuserinfo - - wordpress get_currentuserinfo() WordPress的get_currentuserinfo() - - Fatal error: Call to undefined function get_currentuserinfo() in致命错误:调用未定义的函数get_currentuserinfo()在 - - error错误 - - Fatal error: Call to undefined function get_currentuserinfo()致命错误:调用未定义的函数get_currentuserinfo() - - get_currentuserinfo(); get_currentuserinfo(); - - undefined function get_currentuserinfo()未定义的函数get_currentuserinfo() - - wordpress Fatal error: Call to undefined function WordPress的致命错误:调用未定义的函数 - - wordpress undefined function WordPress的未定义的函数 - - call function error调用函数的错误 - - wordpress Fatal error: Call to undefined function get_currentuserinfo() WordPress的致命错误:调用未定义的函数get_currentuserinfo() - - "Call to undefined function get_currentuserinfo" “召唤未定义函数get_currentuserinfo” - - wordpress Call to undefined function get_currentuserinfo() WordPress的召唤未定义函数get_currentuserinfo() - - wordpress call plugin function WordPress的插件功能调用 - - wordpress get_currentuserinfo(); WordPress的get_currentuserinfo(); - - wordpress 2.5 get_currentuserinfo() WordPress的2.5 get_currentuserinfo() - - get_currentuserinfo() get_currentuserinfo() - - Fatal error: Call to undefined function get_currentuserinfo致命错误:调用未定义的函数get_currentuserinfo - - wordpress Call to undefined function get_currentuserinfo( WordPress的召唤未定义函数get_currentuserinfo( - - get_currentuserinfo() wordpress get_currentuserinfo()在WordPress - - Call to undefined function: get_currentuserinfo()未定义的函数调用:get_currentuserinfo() - - Call to undefined function get_currentuserinfo() wordpress调用未定义函数get_currentuserinfo()在WordPress - - get_currentuserinfo plugin get_currentuserinfo插件 - - demonoid 05001009 - - wordpress get_currentuserinfo undefined function WordPress的get_currentuserinfo未定义的函数 - - get_currentuserinfo undefined get_currentuserinfo未定义 - - wordpress $get_currentuserinfo() undefined function WordPress的$ get_currentuserinfo()函数未定义 - - "undefined function get_currentuserinfo()" “未定义函数get_currentuserinfo()” - - "Fatal error: Call to undefined function get_currentuserinfo()" “致命错误:调用未定义的函数get_currentuserinfo()” - - wordpress get_currentuserinfo undefined WordPress的get_currentuserinfo未定义 - - Call to undefined function get_currentuserinfo() in调用未定义函数get_currentuserinfo()在 - - get_currentuserinfo wordpress 2.7 get_currentuserinfo的WordPress 2.7 - - how to call plugin function from wordpress page如何从WordPress的网页插件功能 - - wordpress get_currentuserinfo() undefined WordPress的get_currentuserinfo()未定义 - - php get_currentuserinfo() PHP的get_currentuserinfo() - - get_currentuserinfo not working get_currentuserinfo不工作 - - wordpress create plugin get_currentuserinfo WordPress的创建插件get_currentuserinfo - - error get_currentuserinfo()错误get_currentuserinfo() - - wordpress get_currentuserinfo() refresh WordPress的get_currentuserinfo()刷新 - -