Property | Type | Description | |
---|---|---|---|
$_fieldmap | array | Map of internal field names to LDAP attribute names. | |
$_ldap | resource | Reference to initialized LDAP driver. | |
$_users | array | Cache for retrieved getUsers() results. |
Method | Description | |
---|---|---|
__construct ( array $params ) | Constructor. | |
_connect ( ) | ||
deleteAlias ( array $info ) | Deletes alias records for a given user. | |
deleteForward ( array $info ) | Deletes forward records for a given user. | |
deleteUser ( integer $user_id ) | Deletes a user. | |
getAddressInfo ( string $address, string $type = 'all' ) : array | Returns an array of information related to the address passed in. | |
getDomainNumUsers ( string $domain_name ) : integer | Returns the current number of users for a domain. | |
getUser ( integer $user_id ) : array | Returns the user information for a given user id. | |
getUserFormAttributes ( ) | ||
getUsers ( string $domain = null ) : array | Returns all available users, if a domain name is passed then limit the list of users only to those users. | |
saveAlias ( array $info ) | Saves or creates alias records for a user. | |
saveForward ( array $info ) | Saves or creates forward records for a given user. |
Method | Description | |
---|---|---|
_createUser ( array $info ) : array | Creates a user in the backend. | |
_deleteDomain ( integer $domain_id ) | Deletes a domain. | |
_getAddresses ( string $domain, string $type = 'all' ) : array | Returns a list of all users, aliases, or groups and forwards for a domain. | |
_getAliases ( string $target = null ) : array | Returns available email address aliases. | |
_getGroupsAndForwards ( string $acquire = null, string $domain = null ) : array | Returns all available groups and forwards unless otherwise specified. | |
_saveUser ( array $info ) : array | Saves a user to the backend. | |
_searchForUser ( string $email_id ) : array | Searchs for a given email account. | |
_updateUser ( array $info ) : array | Updates a user in the backend. |
public __construct ( array $params ) | ||
$params | array | Any parameters needed for this driver. |
protected _createUser ( array $info ) : array | ||
$info | array | The user information to save. |
return | array | The user information. |
protected _deleteDomain ( integer $domain_id ) | ||
$domain_id | integer | The id of the domain to delete. |
protected _getAliases ( string $target = null ) : array | ||
$target | string | If passed a domain then return all alias emails for the domain, otherwise if passed a user name return all virtual emails for that user. |
return | array | The used email aliases. |
protected _getGroupsAndForwards ( string $acquire = null, string $domain = null ) : array | ||
$acquire | string | The default behavior is to acquire both groups and forwards; a value of 'group' will return only groups and a value of 'forward' will return only forwards. |
$domain | string | The name of the domain from which to fetch. |
return | array | The available groups and forwards with details. |
protected _searchForUser ( string $email_id ) : array | ||
$email_id | string | The id of the account to be searched for. |
return | array | Data for given email account on success or no information found. |
protected _updateUser ( array $info ) : array | ||
$info | array | The user information to save. |
return | array | The user information. |
public deleteAlias ( array $info ) | ||
$info | array | The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'alias': The alias we are deleting. |
public deleteForward ( array $info ) | ||
$info | array | The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'forward': The forward we are deleting. |
public deleteUser ( integer $user_id ) | ||
$user_id | integer | The id of the user to delete. |
public getAddressInfo ( string $address, string $type = 'all' ) : array | ||
$address | string | Address for which information will be pulled. |
$type | string | Address type to request. One of 'all', 'user', 'alias', 'forward' or 'group'. |
return | array | Array of user information on success or empty array if the user does not exist. |
public getDomainNumUsers ( string $domain_name ) : integer | ||
$domain_name | string | The name of the domain for which to get the current number of users. |
return | integer | The current number of users. |
public saveAlias ( array $info ) | ||
$info | array | The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'alias_address': The alias to create or the new data for the modified entry. - 'alias': The alias we are modifying, if we are modifying an existing one. |
public saveForward ( array $info ) | ||
$info | array | The info used to store the information. Required fields are: - 'address': The destination address (used for LDAP ID lookup). - 'forward_address': The forward to create or the new data for the modified entry. - 'forward': The forward we are modifying, if we are modifying an existing one. |
protected array $_fieldmap | ||
return | array |
protected resource $_ldap | ||
return | resource |
protected array $_users | ||
return | array |