Call to Undefined Function get_currentuserinfo() Error in WordPress Gọi đến get_currentuserinfo Chức năng Undefined () Lỗi trong WordPress
In WordPress Trong WordPress blog publishing blog xuất bản 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: lỗi hệ thống, có thể có được đăng nhập vào máy chủ web Apache error_log file hoặc được hiển thị trên các trang web trông giống như dòng sau:
Fatal error: Call to undefined function: get_currentuserinfo() in /wordpress/wp-content/plugins/plugin.php Fatal error: Call to undefined function: get_currentuserinfo () trong wordpress / / wp-content / plugins / plugin.php
The undefined get_currentuserinfo function error normally happens in a poorly coded plugin. Các chức năng undefined get_currentuserinfo lỗi thường xảy ra tại một plugin kém mã hoá. If the user deactivate the plug-in that causes the error, the issue will be fixed, resolved and go away. Nếu người dùng tắt plug-in là nguyên nhân gây lỗi, vấn đề này sẽ được cố định, giải quyết và biến mất. 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. Lỗi này xảy ra vì $ userdata hoặc $ user_id biến toàn cầu trở thành null, không được xác định hoặc giá trị sản phẩm nào sau khi plugin được khởi xướng, bao gồm, nối và nạp.
The User ID and User Data (which User ID is part of) is globally-available var when in the WordPress admin pages. ID người dùng và sử dụng dữ liệu (có User ID là một phần của) là trên toàn cầu-sẵn var khi trong các trang: admin 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(). Để giải quyết và sửa chữa lỗi get_currentuserinfo undefined chức năng (), đặt lại và phạm vi biến đến toàn cầu trong plugin trước khi bắt đầu của chức năng đó gọi 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: Để thiết lập $ userdata hoặc vars $ user_id đến phạm vi toàn cầu, thêm vào một trong những dòng sau vào phần đầu của tập tin PHP plugin:
$userdata = $GLOBALS['userdata']; $ userdata = $ GLOBALS [ 'userdata'];
or, hoặc,
global $userdata; global $ userdata;
For user id, use “global $user_id;” instead. Đối với người dùng id, sử dụng "global $ user_id;" để thay thế.
Update: Above trick does not work in new WordPress version, try the Cập nhật: Trên trick không làm việc trong phiên bản WordPress mới, hãy thử fix undefined function get_currentuserinfo() fatal error sửa chữa get_currentuserinfo chức năng undefined () gây tử vong lỗi guide instead. hướng dẫn để thay thế.
IMPORTANT : You're reading a machine translated page which is provided "as is" without warranty. Quan trọng: Bạn đang đọc một máy dịch trang mà là cung cấp "như là" không có bảo hành. 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. Không giống như các bản dịch của con người, máy phiên dịch không hiểu được ngữ pháp, ngữ nghĩa, cú pháp, thành ngữ của ngôn ngữ tự nhiên, do đó thường không chính xác và sản xuất thấp, chất lượng văn bản đó là sai lầm và không thể hiểu được. Thus, please refer to Vì vậy, xin tham khảo original English article bản gốc tiếng Anh bài viết when in doubt. khi nghi ngờ.
Related Articles Bài viết liên quan
- Call To Undefined Function: ctype_digit() in WordPress 2.5 Gọi Để Undefined Function: ctype_digit () trong WordPress 2,5
- Call to Undefined Function: wp_constrain_dimensions() When Uploading Images or image_downsize() in Gallery/Media Library in WordPress 2.5 Gọi đến Undefined Function: wp_constrain_dimensions () Hình ảnh Khi tải lên hoặc image_downsize () trong Bộ sưu tập / Truyền thông Thư viện trong WordPress 2,5
- PHP Fatal Error on Call to Add_Query_Var in Taxonomy.php After Upgrading to WordPress 2.5 RC2 PHP Fatal Error on Gọi đến Add_Query_Var trong Taxonomy.php Sau khi Nâng cấp lên WordPress 2,5 RC2
- WordPress 2.5.1 Released for Download WordPress 2.5.1 Phát hành cho Download
- Fix WordPress 2.5 Image or Media Flash Uploader Not Working Issue in IE7 Fix WordPress 2,5 hình hoặc Flash Media Uploader Không phải làm việc phát hành trong IE7
- Disable WordPress 2.5 Flash Image/Video/Media Uploader with Plugin Vô hiệu hoá WordPress 2,5 Flash Hình / Video / Media Uploader với Plugin
- WordPress 2.5 Released for Free Download WordPress 2,5 Phát hành cho Miễn phí Tải
- Media Buttons Disabler Plugin to Remove “Add Media” Icons in WordPress 2.5 Media Buttons Disabler Plugin để Hủy bỏ "Thêm Media" Icons trong WordPress 2,5
- Workaround to Override WordPress Shortcode and Display the [] Brackets Tags Workaround để Override WordPress Shortcode và hiển thị các [] brackets Tags
- How to SEO Optimize WordPress 2.5 Blog Web Page Title Without Optimal Title Plugin Làm thế nào để SEO Tối ưu hóa blog WordPress 2,5 Tiêu đề Trang web Nếu không có tối ưu đề Plugin









































