如果用户不存在,则作为客户端登录的一部分执行。
参数
| 变量 | 类型 | 注意 |
|---|---|---|
| username | string | |
| password | string |
响应
返回数据以创建用户或引用要登录的现有客户端。现有用户的 ID、电子邮件、布尔创建以创建新用户、名字、姓氏等以创建客户端。
示例代码
<?php
add_hook('ClientLoginShare', 1, function($vars) {
// Perform custom authentication logic here
// There are 4 supported return values, each demonstrated below.
// User not found
return false;
// Login as existing WHMCS Client ID
return array(
'id' => '123',
);
// Login as existing WHMCS Client by Email Address
return array(
'email' => '[email protected]',
);
// Create a new client and login
return array(
'create' => true,
'email' => '[email protected]',
'firstname' => 'Demo',
'lastname' => 'User',
'companyname' => 'Demo Company',
'address1' => '123 Demo Street',
'address2' => '',
'city' => 'Demo',
'state' => 'Demo',
'postcode' => '12345',
'country' => 'US',
'phonenumber' => '11111111111',
'password' => 'xxxxxxxx',
);
});
相关用法
- PHP WHMCS ClientAreaPageDownloads用法及代码示例
- PHP WHMCS ClientAreaHeaderOutput用法及代码示例
- PHP WHMCS ClientAreaPageSupportTickets用法及代码示例
- PHP WHMCS ClientAreaPageDomainDNSManagement用法及代码示例
- PHP WHMCS ClientAreaPageAffiliates用法及代码示例
- PHP WHMCS ClientAreaPageViewInvoice用法及代码示例
- PHP WHMCS ClientAreaPageProductsServices用法及代码示例
- PHP WHMCS ClientAreaPageDomainRegisterNameservers用法及代码示例
- PHP WHMCS ClientAreaPageUnsubscribe用法及代码示例
- PHP WHMCS ClientAreaPageConfigureSSL用法及代码示例
- PHP WHMCS ClientAreaPageDomainDetails用法及代码示例
- PHP WHMCS ClientAreaPageAddonModule用法及代码示例
- PHP WHMCS ClientAreaPageContact用法及代码示例
- PHP WHMCS ClientAreaPageSecurity用法及代码示例
- PHP WHMCS ClientAreaPage用法及代码示例
- PHP WHMCS ClientChangePassword用法及代码示例
- PHP WHMCS ClientAreaProductDetailsOutput用法及代码示例
- PHP WHMCS ClientAreaDomainDetailsOutput用法及代码示例
- PHP WHMCS ClientAreaPageDomainEmailForwarding用法及代码示例
- PHP WHMCS ClientAreaPageDomainAddons用法及代码示例
- PHP WHMCS ClientAreaPageAddFunds用法及代码示例
- PHP WHMCS ClientAreaPageBulkDomainManagement用法及代码示例
- PHP WHMCS ClientAreaRegister用法及代码示例
- PHP WHMCS ClientAreaPaymentMethods用法及代码示例
- PHP WHMCS ClientAreaPageViewWHOIS用法及代码示例
注:本文由纯净天空筛选整理自whmcs.com大神的英文原创作品 ClientLoginShare。非经特殊声明,原始代码版权归原作者所有,本译文未经允许或授权,请勿转载或复制。
