Zm_Account

Zm_Account is a class which allows to manage Zimbra accounts via SOAP

You may create, modify, rename, delete and get the attributes of a Zimbra account using this class

For the usage examples of all class methods check the source code of test.php

package

ZimbraSoapPhp

Methods

Constructor

__construct(\Zm_Auth $auth) 

Arguments

$auth

\Zm_Auth

soap authentication

accountExists

accountExists(string $idOrNameAccount, string $type = "auto") : boolean

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

boolean

exists

addAccountAlias

addAccountAlias(string $idOrNameAccount, string $alias, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$alias

string

account alias

$type

string

value of the account (auto, name, id)

Response

array

informations

createAccount

createAccount(string $name, string $password, array $attrs = array()) : string

Arguments

$name

string

account name

$password

string

password

$attrs

array

an optional array containing the account attributes to be set

Response

string

the new account's id

deleteAccount

deleteAccount(string $idOrNameAccount, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

array

informations

expireAccountSessions

expireAccountSessions(string $idOrNameAccount, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

array

informations

fetchAccounts

fetchAccounts(string $ldapQuery, array $attrList, string $nameDomain = null) : array
author

Marc Lamouche marc.lamouche@ined.fr

Arguments

$ldapQuery

string

LDAP-style filter string (RFC 2254)

$attrList

array

names of requested attributes

$nameDomain

string

domain name to restrict search request

Response

array

informations for accounts as specified in $ldapQuery

getAccountAliases

getAccountAliases(string $idOrNameAccount, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

array

aliases

getAccountCos

getAccountCos(string $idOrNameAccount, string $returnType = "NAME", string $type = "auto") : string

Arguments

$idOrNameAccount

string

account id or account name

$returnType

string

get the COS ID or NAME

$type

string

value of the account (auto, name, id)

Response

string

COS id or name

getAccountId

getAccountId(string $name) : string

Arguments

$name

string

account name

Response

string

account id

getAccountInfo

getAccountInfo(string $idOrNameAccount, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

array

informations

getAccountOption

getAccountOption(string $idOrNameAccount, string $optName, integer $multisingle = ATTR_SINGLEVALUE, string $type = "auto") : string

Arguments

$idOrNameAccount

string

account id or account name

$optName

string

name of the option to get

$multisingle

integer

(ATTR_SINGLEVALUE, ATTR_MULTIVALUE)

$type

string

value of the account (auto, name, id)

Response

string

option

getAccountOptions

getAccountOptions(string $idOrNameAccount, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

array

options

getAccountStatus

getAccountStatus(string $idOrNameAccount, string $type = "auto") : string

Arguments

$idOrNameAccount

string

account id or account name

$type

string

value of the account (auto, name, id)

Response

string

status

getAllAccounts

getAllAccounts(string $idOrNameDomain, string $type = "auto") : array
deprecated

it may take a long time to complete and fail on servers with lots of accounts

use fetchAccounts instead

Arguments

$idOrNameDomain

string

domain id or domain name

$type

string

value of the domain (auto, name, id)

Response

array

informations for all accounts

getCosId

getCosId(string $name) : string

Arguments

$name

string

the COS name

Response

string

COS id

modifyAccount

modifyAccount(string $idOrNameAccount, array $attrs = array(), string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$attrs

array

an array containing the account attributes to be set

$type

string

value of the account (auto, name, id)

Response

array

informations

removeAccountAlias

removeAccountAlias(string $idOrNameAccount, string $alias, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$alias

string

account alias

$type

string

value of the account (auto, name, id)

Response

array

informations

renameAccount

renameAccount(string $idOrNameAccount, string $newName, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$newName

string

new account name

$type

string

value of the account (auto, name, id)

Response

array

informations

setAccountCos

setAccountCos(string $idOrNameAccount, string $cosName, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$cosName

string

the COS name

$type

string

value of the account (auto, name, id)

Response

array

informations

setAccountPassword

setAccountPassword(string $idOrNameAccount, string $password, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$password

string

password

$type

string

value of the account (auto, name, id)

Response

array

informations

setAccountStatus

setAccountStatus(string $idOrNameAccount, string $status, string $type = "auto") : array

Arguments

$idOrNameAccount

string

account id or account name

$status

string

the status (active, maintenance, pending, locked, closed)

$type

string

value of the account (auto, name, id)

Response

array

informations

Properties

$auth

auth : \Zm_Auth
var

soap authentication

Type(s)

\Zm_Auth