我寫了一個定製的PHP文件,以便從SugarCRM的AJAX請求中調用。但是,當我嘗試打印時SugarCRM,通過AJAX調用獲取當前登錄的用戶詳細信息
global $current_user;
print_r($current_user);
它會打印空白值,並列出數組中列出的所有字段,如下所示。
User Object
(
[name] =>
[full_name] =>
[id] =>
[user_name] =>
[user_hash] =>
[salutation] =>
[first_name] =>
[last_name] =>
[date_entered] =>
[date_modified] =>
[modified_user_id] =>
[created_by] =>
[created_by_name] =>
[modified_by_name] =>
[description] =>
[phone_home] =>
[phone_mobile] =>
[phone_work] =>
[phone_other] =>
[phone_fax] =>
[email1] =>
[email2] =>
[address_street] =>
[address_city] =>
[address_state] =>
[address_postalcode] =>
[address_country] =>
[status] =>
[title] =>
[portal_only] => 0
[department] =>
[authenticated] =>
[error_string] =>
[is_admin] => 0
[employee_status] =>
[messenger_id] =>
[messenger_type] =>
[is_group] =>
[accept_status] =>
[team_id] =>
[receive_notifications] => 1
[default_team] =>
[reports_to_name] =>
[reports_to_id] =>
[team_exists] =>
[table_name] => users
[module_dir] => Users
[object_name] => User
[user_preferences] =>
[importable] => 1
.....
我已搜查在SugarCRM的論壇,但沒有用。我懷疑原因可能是有效的入口點是不是在我的自定義頁面定義,因爲不知道如何除下列方法
if(!defined('sugarEntry'))define('sugarEntry', true);
if(!defined('sugarEntry') || !sugarEntry) die('Not A Valid Entry Point');
require_once('include/entryPoint.php');
這是用於SugarCRM 7.x安裝還是用於SugarCRM 6.x? – jjtbsomhorst 2014-03-13 08:38:40
其SUgarCRM 6.4 – AjayR 2014-03-17 03:12:17