获取当前管理员用户的详细信息
请求参数
参数 | 类型 | 说明 | 必需的 |
---|---|---|---|
action | string | “GetAdminDetails” | Required |
响应参数
参数 | 类型 | 说明 |
---|---|---|
result | string | 操作结果:成功或错误 |
adminid | int | 当前管理员 ID。 |
name | string | 管理员用户的全名。 |
notes | string | 管理员用户的当前注释。 |
signature | string | 支持票签名。 |
allowedpermissions | string | 管理员用户可用的所有权限的逗号分隔列表。 |
departments | string | 管理员用户所属的所有支持部门的逗号分隔列表。 |
requesttime | string | 请求的日期和时间。 |
whmcs | array | 当前 WHMCS 安装的版本详细信息 |
示例请求 (CURL)
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://www.example.com/includes/api.php');
curl_setopt($ch, CURLOPT_POST, 1);
curl_setopt($ch, CURLOPT_POSTFIELDS,
http_build_query(
array(
'action' => 'GetAdminDetails',
// See https://developers.whmcs.com/api/authentication
'username' => 'IDENTIFIER_OR_ADMIN_USERNAME',
'password' => 'SECRET_OR_HASHED_PASSWORD',
'responsetype' => 'json',
)
)
);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, 1);
$response = curl_exec($ch);
curl_close($ch);
示例请求(本地 API)
$command = 'GetAdminDetails';
$postData = array(
);
$adminUsername = 'ADMIN_USERNAME'; // Optional for WHMCS 7.2 and later
$results = localAPI($command, $postData, $adminUsername);
print_r($results);
示例响应 JSON
{
"result": "success",
"adminid": "1",
"name": "Site Admin",
"notes": "Welcome to WHMCS! Please ensure you have setup the cron job to automate tasks",
"signature": "",
"allowedpermissions": "Main Homepage,My Account,List Clients,List Services,List Addons,List Domains,Add New Client,Edit Clients Details,Manage Pay Methods,View Clients Products\/Services,Edit Clients Products\/Services,Delete Clients Products\/Services,Perform Server Operations,View Clients Domains,Edit Clients Domains,Delete Clients Domains,View Clients Notes,Add\/Edit Client Notes,Delete Client,Mass Mail,View Cancellation Requests,Manage Affiliates,View Orders,Delete Order,View Order Details,Add New Order,List Transactions,Add Transaction,Edit Transaction,Delete Transaction,View Gateway Log,List Invoices,Create Invoice,Manage Invoice,Delete Invoice,Offline Credit Card Processing,Support Center Overview,Manage Announcements,Manage Knowledgebase,Manage Downloads,List Support Tickets,Open New Ticket,Manage Predefined Replies,View Reports,Addon Modules,Link Tracking,Calendar,To-Do List,WHOIS Lookups,Domain Resolver Checker,View Integration Code,WHM Import Script,Database Status,System Cleanup Operations,View PHP Info,View Activity Log,View Admin Log,View Email Message Log,View Ticket Mail Import Log,View WHOIS Lookup Log,Configure General Settings,Configure Administrators,Configure Admin Roles,Configure Servers,Configure Automation Settings,Configure Payment Gateways,Tax Configuration,View Email Templates,View Products\/Services,Configure Product Addons,View Promotions,Configure Domain Pricing,Configure Support Departments,Configure Spam Control,Configure Banned Emails,Configure Domain Registrars,Configure Fraud Protection,Configure Custom Client Fields,API Access,View Flagged Tickets,Configure Database Backups,Manage Network Issues,Manage Quotes,Configure Currencies,Configure Security Questions,Client Data Export,Mass Data Export,View Billable Items,Manage Billable Items,Configure Client Groups,Refund Invoice Payments,Delete Ticket,View Income Totals,Manage Clients Files,Configure Ticket Statuses,Delete Client Notes,Perform Registrar Operations,Create Upgrade\/Downgrade Orders,Configure Addon Modules,Email Marketer,Configure Product Bundles,View Module Debug Log,View Clients Summary,View Support Ticket,Decrypt Full Credit Card Number,Update\/Delete Stored Credit Card,Create\/Edit Promotions,Delete Promotions,View Banned IPs,Add Banned IP,Unban Banned IP,Create\/Edit Email Templates,Delete Email Templates,Manage Email Template Languages,Create New Products\/Services,Edit Products\/Services,Delete Products\/Services,Manage Product Groups,Allow Login as Owner,Configure Order Statuses,Attempts CC Captures,Generate Due Invoices,Create Predefined Replies,Create Predefined Replies,Delete Predefined Replies,Delete Predefined Replies,Configure Two-Factor Authentication,View Credit Log,Manage Credits,WHMCSConnect,Health and Updates,Configure Application Links,Configure OpenID Connect,Update WHMCS,Modify Update Configuration",
"departments": ",1,",
"whmcs": {
"version": "7.10.2",
"canonicalversion": "7.10.2-release.1"
}
}
相关用法
- PHP WHMCS GetAdminUsers用法及代码示例
- PHP WHMCS GetAutomationLog用法及代码示例
- PHP WHMCS GetActivityLog用法及代码示例
- PHP WHMCS GetAnnouncements用法及代码示例
- PHP WHMCS GetAffiliates用法及代码示例
- PHP WHMCS GetTicketNotes用法及代码示例
- PHP WHMCS GetUsers用法及代码示例
- PHP WHMCS GetTLDPricing用法及代码示例
- PHP WHMCS GetToDoItemStatuses用法及代码示例
- PHP WHMCS GetPermissionsList用法及代码示例
- PHP WHMCS GetCurrencies用法及代码示例
- PHP WHMCS GetStaffOnline用法及代码示例
- PHP WHMCS GetEmails用法及代码示例
- PHP WHMCS GetClientPassword用法及代码示例
- PHP WHMCS GetPromotions用法及代码示例
- PHP WHMCS GetRegistrars用法及代码示例
- PHP WHMCS GetQuotes用法及代码示例
- PHP WHMCS GetPaymentMethods用法及代码示例
- PHP WHMCS GetModuleQueue用法及代码示例
- PHP WHMCS GetTickets用法及代码示例
- PHP WHMCS GetProducts用法及代码示例
- PHP WHMCS GetProjects用法及代码示例
- PHP WHMCS GetInvoices用法及代码示例
- PHP WHMCS GetPayMethods用法及代码示例
- PHP WHMCS GetServers用法及代码示例
注:本文由纯净天空筛选整理自whmcs.com大神的英文原创作品 GetAdminDetails。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。