API Documentation
Table of Contents
- kerioSingleFindAll() : array<string|int, mixed>
- Helper function to find values of a named key in a multidimensional arrays or objects
- kerioSingleCheckPassword() : string
- server side password check
- kerioSingle_MetaData() : array<string|int, mixed>
- Define module related meta data.
- kerioSingle_TestConnection() : array<string|int, mixed>
- Test connection to a Kerio server with the given server parameters.
- kerioSingle_ClientArea() : array<string|int, mixed>
- Client area output logic handling.
- kerioSingle_UsageUpdate() : mixed
- Usage Update
- kerioSingle_ChangePassword() : string
- Change the password for a Kerio account.
- kerioSingle_CreateAccount() : string
- Provision a new instance of a Kerio account.
- kerioSingle_SuspendAccount() : string
- Set a Kerio account to status locked.
- kerioSingle_UnsuspendAccount() : string
- Set a Kerio account to status active.
- kerioSingle_TerminateAccount() : string
- Removes a Kerio account.
- kerioSingle_ChangePackage() : string
- Set a new class of service for a Kerio account.
- kerioSingle_ConfigOptions() : array<string|int, mixed>
- Define Kerio product configuration options.
- kerioSingle_ServiceSingleSignOn() : array<string|int, mixed>
- Perform single sign-on for a given instance of a product/service.
- kerioSingleUpdateQuota() : mixed
- Perform an update of customfields to prevent downgrades.
Functions
kerioSingleFindAll()
Helper function to find values of a named key in a multidimensional arrays or objects
kerioSingleFindAll(array<string|int, mixed> $haystack, string $needle) : array<string|int, mixed>
Parameters
- $haystack : array<string|int, mixed>
-
mixed data
- $needle : string
-
key to search for values
kerioSingleCheckPassword()
server side password check
kerioSingleCheckPassword(string $pwd) : string
recheck the client side password check in case that the client side check has been disabled
Parameters
- $pwd : string
-
password
kerioSingle_MetaData()
Define module related meta data.
kerioSingle_MetaData() : array<string|int, mixed>
Values returned here are used to determine module related abilities and settings.
Tags
kerioSingle_TestConnection()
Test connection to a Kerio server with the given server parameters.
kerioSingle_TestConnection(array<string|int, mixed> $params) : array<string|int, mixed>
Allows an admin user to verify that an API connection can be successfully made with the given configuration parameters for a server.
When defined in a module, a Test Connection button will appear alongside the Server Type dropdown when adding or editing an existing server.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_ClientArea()
Client area output logic handling.
kerioSingle_ClientArea(array<string|int, mixed> $params) : array<string|int, mixed>
This function is used to define module specific client area output. It should return an array consisting of a template file and optional additional template variables to make available to that template.
The template file you return can be one of two types:
-
tabOverviewModuleOutputTemplate - The output of the template provided here will be displayed as part of the default product/service client area product overview page.
-
tabOverviewReplacementTemplate - Alternatively using this option allows you to entirely take control of the product/service overview page within the client area.
Whichever option you choose, extra template variables are defined in the same way. This demonstrates the use of the full replacement.
Please Note: Using tabOverviewReplacementTemplate means you should display the standard information such as pricing and billing details in your custom template or they will not be visible to the end user.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_UsageUpdate()
Usage Update
kerioSingle_UsageUpdate(array<string|int, mixed> $params) : mixed
Important: Runs daily per server not per product Run Manually: /admin/reports.php?report=disk_usage_summary&action=updatestats
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_ChangePassword()
Change the password for a Kerio account.
kerioSingle_ChangePassword(array<string|int, mixed> $params) : string
Called when a password change is requested. This can occur either due to a client requesting it via the client area or an admin requesting it from the admin side.
This option is only available to client end users when the product is in an active status.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_CreateAccount()
Provision a new instance of a Kerio account.
kerioSingle_CreateAccount(array<string|int, mixed> $params) : string
Attempt to provision a new Kerio mail account. This is called any time provisioning is requested inside of WHMCS. Depending upon the configuration, this can be any of:
- When a new order is placed
- When an invoice for a new order is paid
- Upon manual request by an admin user
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_SuspendAccount()
Set a Kerio account to status locked.
kerioSingle_SuspendAccount(array<string|int, mixed> $params) : string
Called when a suspension is requested. This is invoked automatically by WHMCS when a product becomes overdue on payment or can be called manually by admin user.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_UnsuspendAccount()
Set a Kerio account to status active.
kerioSingle_UnsuspendAccount(array<string|int, mixed> $params) : string
Called when an un-suspension is requested. This is invoked automatically upon payment of an overdue invoice for a product, or can be called manually by admin user.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_TerminateAccount()
Removes a Kerio account.
kerioSingle_TerminateAccount(array<string|int, mixed> $params) : string
Called when a termination is requested. This can be invoked automatically for overdue products if enabled, or requested manually by an admin user.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_ChangePackage()
Set a new class of service for a Kerio account.
kerioSingle_ChangePackage(array<string|int, mixed> $params) : string
Called to apply a change of the class of service. It is called to provision upgrade or downgrade orders, as well as being able to be invoked manually by an admin user.
This same function is called for upgrades and downgrades of both products and configurable options.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingle_ConfigOptions()
Define Kerio product configuration options.
kerioSingle_ConfigOptions(mixed $params) : array<string|int, mixed>
Gather classes of service from the Zinbra server. Calls a function to create all necessary customfields for the order form using the selected values.
Parameters
- $params : mixed
Tags
kerioSingle_ServiceSingleSignOn()
Perform single sign-on for a given instance of a product/service.
kerioSingle_ServiceSingleSignOn(array<string|int, mixed> $params) : array<string|int, mixed>
Called when single sign-on is requested for an instance of a product/service.
When successful, returns an URL to which the user should be redirected.
Parameters
- $params : array<string|int, mixed>
-
common module parameters
Tags
kerioSingleUpdateQuota()
Perform an update of customfields to prevent downgrades.
kerioSingleUpdateQuota(array<string|int, mixed> $params) : mixed
Called in changePackage or createAccount functions.
Parameters
- $params : array<string|int, mixed>
-
common module parameters