Zm_Account
Zm_Account is a class which allows to manage Kerio accounts via SOAP
You may create, modify, rename, delete and get the attributes of a Kerio account using this class
For the usage examples of all class methods check the source code of test.php
Table of Contents
- $auth : Zm_Auth
- $auth
- __construct() : mixed
- Constructor
- accountExists() : bool
- accountExists
- addAccountAlias() : array<string|int, mixed>
- addAccountAlias
- createAccount() : string
- createAccount
- deleteAccount() : array<string|int, mixed>
- deleteAccount
- expireAccountSessions() : array<string|int, mixed>
- expireAccountSessions
- fetchAccounts() : array<string|int, mixed>
- fetchAccounts
- getAccount() : string
- getAccount
- getAccountAliases() : array<string|int, mixed>
- getAccountAliases
- getAccountCos() : string
- getAccountCos
- getAccountId() : string
- getAccountId
- getAccountInfo() : array<string|int, mixed>
- getAccountInfo
- getAccountOption() : string
- getAccountOption
- getAccountOptions() : array<string|int, mixed>
- getAccountOptions
- getAccountStatus() : string
- getAccountStatus
- getAllAccounts() : array<string|int, mixed>
- getAllAccounts
- getAllCos() : array<string|int, mixed>
- getAllCos
- getCosId() : string
- getCosId
- getMailbox() : array<string|int, mixed>
- getMailbox
- getQuota() : string
- getQuota
- modifyAccount() : array<string|int, mixed>
- modifyAccount
- removeAccountAlias() : array<string|int, mixed>
- removeAccountAlias
- renameAccount() : array<string|int, mixed>
- renameAccount
- setAccountCos() : array<string|int, mixed>
- setAccountCos
- setAccountPassword() : array<string|int, mixed>
- setAccountPassword
- setAccountStatus() : array<string|int, mixed>
- setAccountStatus
Properties
$auth
$auth
private
Zm_Auth
$auth
Methods
__construct()
Constructor
public
__construct(Zm_Auth $auth) : mixed
Parameters
- $auth : Zm_Auth
-
soap authentication
Return values
mixed —accountExists()
accountExists
public
accountExists(string $idOrNameAccount[, string $type = "auto" ]) : bool
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
bool —exists
addAccountAlias()
addAccountAlias
public
addAccountAlias(string $idOrNameAccount, string $alias[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $alias : string
-
account alias
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
createAccount()
createAccount
public
createAccount(string $name, string $password[, array<string|int, mixed> $attrs = array() ]) : string
Parameters
- $name : string
-
account name
- $password : string
-
password
- $attrs : array<string|int, mixed> = array()
-
an optional array containing the account attributes to be set
Return values
string —the new account's id
deleteAccount()
deleteAccount
public
deleteAccount(string $idOrNameAccount[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
expireAccountSessions()
expireAccountSessions
public
expireAccountSessions(string $idOrNameAccount[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
fetchAccounts()
fetchAccounts
public
fetchAccounts(string $ldapQuery, array<string|int, mixed> $attrList[, string $nameDomain = null ]) : array<string|int, mixed>
Parameters
- $ldapQuery : string
-
LDAP-style filter string (RFC 2254)
- $attrList : array<string|int, mixed>
-
names of requested attributes
- $nameDomain : string = null
-
domain name to restrict search request
Tags
Return values
array<string|int, mixed> —informations for accounts as specified in $ldapQuery
getAccount()
getAccount
public
getAccount(string $name) : string
Parameters
- $name : string
-
account name
Return values
string —account informations
getAccountAliases()
getAccountAliases
public
getAccountAliases(string $idOrNameAccount[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —aliases
getAccountCos()
getAccountCos
public
getAccountCos(string $idOrNameAccount[, string $returnType = "NAME" ][, string $type = "auto" ]) : string
Parameters
- $idOrNameAccount : string
-
account id or account name
- $returnType : string = "NAME"
-
get the COS ID or NAME
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
string —COS id or name
getAccountId()
getAccountId
public
getAccountId(string $name) : string
Parameters
- $name : string
-
account name
Return values
string —account id
getAccountInfo()
getAccountInfo
public
getAccountInfo(string $idOrNameAccount[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
getAccountOption()
getAccountOption
public
getAccountOption(string $idOrNameAccount, string $optName[, int $multisingle = ATTR_SINGLEVALUE ][, string $type = "auto" ]) : string
Parameters
- $idOrNameAccount : string
-
account id or account name
- $optName : string
-
name of the option to get
- $multisingle : int = ATTR_SINGLEVALUE
-
(ATTR_SINGLEVALUE, ATTR_MULTIVALUE)
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
string —option
getAccountOptions()
getAccountOptions
public
getAccountOptions(string $idOrNameAccount[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —options
getAccountStatus()
getAccountStatus
public
getAccountStatus(string $idOrNameAccount[, string $type = "auto" ]) : string
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
string —status
getAllAccounts()
getAllAccounts
public
getAllAccounts(string $idOrNameDomain[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameDomain : string
-
domain id or domain name
- $type : string = "auto"
-
value of the domain (auto, name, id)
Tags
Return values
array<string|int, mixed> —informations for all accounts
getAllCos()
getAllCos
public
getAllCos() : array<string|int, mixed>
Return values
array<string|int, mixed> —informations
getCosId()
getCosId
public
getCosId(string $name) : string
Parameters
- $name : string
-
the COS name
Return values
string —COS id
getMailbox()
getMailbox
public
getMailbox(string $idOrNameAccount[, mixed $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $type : mixed = "auto"
Return values
array<string|int, mixed> —informations
getQuota()
getQuota
public
getQuota(string $name) : string
Parameters
- $name : string
-
account name
Return values
string —account informations
modifyAccount()
modifyAccount
public
modifyAccount(string $idOrNameAccount[, array<string|int, mixed> $attrs = array() ][, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $attrs : array<string|int, mixed> = array()
-
an array containing the account attributes to be set
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
removeAccountAlias()
removeAccountAlias
public
removeAccountAlias(string $idOrNameAccount, string $alias[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $alias : string
-
account alias
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
renameAccount()
renameAccount
public
renameAccount(string $idOrNameAccount, string $newName[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $newName : string
-
new account name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
setAccountCos()
setAccountCos
public
setAccountCos(string $idOrNameAccount, string $cosName[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $cosName : string
-
the COS name
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
setAccountPassword()
setAccountPassword
public
setAccountPassword(string $idOrNameAccount, string $password[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $password : string
-
password
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations
setAccountStatus()
setAccountStatus
public
setAccountStatus(string $idOrNameAccount, string $status[, string $type = "auto" ]) : array<string|int, mixed>
Parameters
- $idOrNameAccount : string
-
account id or account name
- $status : string
-
the status (active, maintenance, pending, locked, closed)
- $type : string = "auto"
-
value of the account (auto, name, id)
Return values
array<string|int, mixed> —informations