public
|
#
__construct( CApiGlobalManager & $oManager )
Creates a new instance of the object.
Creates a new instance of the object.
Parameters
Overrides
|
public
CAccount
|
#
getAccountByEmail( string $sEmail )
Retrieves information about account wich is specified as default. Email address is used for look up.
The method is especially useful in case if your product configuration allows for adding multiple accounts per user.
Retrieves information about account wich is specified as default. Email address is used for look up.
The method is especially useful in case if your product configuration allows for adding multiple accounts per user.
Parameters
- $sEmail
- Email address associated with the account.
Returns
Overrides
|
public
CAccount
|
#
getAccountById( integer $mAccountId, mixed $bIdIsMd5 = false, boolean $bIdIsMd5,… )
Retrieves information on WebMail Pro account. Account ID is used for look up.
Retrieves information on WebMail Pro account. Account ID is used for look up.
Parameters
- $mAccountId
- Account identifier.
- $bIdIsMd5
- $mAccountId
- $bIdIsMd5,…
- Default value is false.
Returns
Overrides
|
public
CUser
|
#
getUserById( integer $iUserId, CDomain $oDomain = null )
Retrieves information on particular WebMail Pro user.
Retrieves information on particular WebMail Pro user.
Parameters
- $iUserId
- User identifier.
- $oDomain
Returns
Overrides
|
public
integer
|
#
getDefaultAccountDomainId( integer $iUserId )
Returns domain identifier for primary user account. The method is especially useful in case
if your product configuration allows for adding multiple accounts per user.
Returns domain identifier for primary user account. The method is especially useful in case
if your product configuration allows for adding multiple accounts per user.
Parameters
- $iUserId
- WebMail Pro user identifier (not to be confused with account ID).
Returns
integer
Overrides
|
public
integer
|
#
getDefaultAccountId( integer $iUserId )
Returns identifier of primary user account.
Returns identifier of primary user account.
Parameters
- $iUserId
- WebMail Pro user identifier.
Returns
integer
Overrides
|
public
integer
|
#
getAccountUsedSpace( string $sEmail )
Returns account used space in Kb.
Returns account used space in Kb.
Parameters
- $sEmail
- Email address associated with the account.
Returns
integer
Overrides
|
public
CIdentity
|
#
getIdentity( integer $iIdentityId )
Returns identity.
Parameters
- $iIdentityId
- Indentity identifier.
Returns
Overrides
|
public
array|boolean
|
#
getAccountIdentities( integer $IdAccount )
Returns list of identities belonging to account.
Returns list of identities belonging to account.
Parameters
- $IdAccount
- Identifier of account that contains identities to get.
Returns
array|boolean
Overrides
|
public
array|boolean
|
#
getUserIdentities( integer $IdUser )
Returns list of identities belonging to user.
Returns list of identities belonging to user.
Parameters
- $IdUser
- Identifier of user that contains identities to get.
Returns
array|boolean
|
protected
CAccount
|
#
_getAccountBySql( string $sSql )
Obtains CAccount object by query-string.
Obtains CAccount object by query-string.
Parameters
- $sSql
- Query-string for obtaining CAccount object.
Returns
|
protected
CCalUser
|
#
_getCalUserBySql( string $sSql )
Obtains CCalUser object by query-string.
Obtains CCalUser object by query-string.
Parameters
- $sSql
- Query-string for obtaining CCalUser object.
Returns
|
public
boolean
|
#
createIdentity( CIdentity & $oIdentity )
Creates identity in account.
Creates identity in account.
Parameters
- $oIdentity
- $oIdentity Identity to create.
Returns
boolean
Overrides
|
public
boolean
|
#
createAccount( CAccount & $oAccount )
Creates WebMail account.
Parameters
- $oAccount
- $oAccount Object instance with prepopulated account properties.
Returns
boolean
Overrides
|
public
boolean
|
#
enableAccounts( array $aAccountsIds, boolean $bIsEnabled )
Enable/disable one or several WebMail Pro accounts.
Enable/disable one or several WebMail Pro accounts.
Parameters
- $aAccountsIds
- List of accounts to be enabled/disabled.
- $bIsEnabled
- true for enabling accounts, false for disabling them.
Returns
boolean
Overrides
|
public
boolean
|
#
updateAccount( CAccount $oAccount )
Saves changes made to the account.
Saves changes made to the account.
Parameters
- $oAccount
- $oAccount Account object containing data to be saved.
Returns
boolean
Overrides
|
public
boolean
|
#
updateIdentity( CIdentity $oIdentity )
Saves changes made to the identity.
Saves changes made to the identity.
Parameters
- $oIdentity
- $oIdentity Identity object containing data to be saved.
Returns
boolean
Overrides
|
public
boolean
|
#
updateIdentitiesDefaults( CIdentity $iIdentityId, integer $iIdAccount )
Updates value of default identity for account.
Updates value of default identity for account.
Parameters
- $iIdentityId
- $oIdentity New default identity.
- $iIdAccount
- Account identifier.
Returns
boolean
|
public
boolean
|
#
updateAccountLastLoginAndCount( integer $iUserId )
For the given user, updates login-related information including time of last login.
For the given user, updates login-related information including time of last login.
Parameters
- $iUserId
- User identifier.
Returns
boolean
Overrides
|
public
boolean
|
#
accountExists( CAccount $oAccount )
Checks if particular account exists.
Checks if particular account exists.
Parameters
- $oAccount
- Object instance with prepopulated account properties.
Returns
boolean
Overrides
|
public
boolean
|
#
deleteIdentity( integer $iIdentityId )
Deletes identity.
Parameters
- $iIdentityId
- Identity identifier.
Returns
boolean
Overrides
|
public
boolean
|
#
deleteAccount( CAccount $iAccountId )
Deletes account from WebMail Pro database.
Deletes account from WebMail Pro database.
Parameters
- $iAccountId
- $oAccount Object instance with prepopulated account properties.
Returns
boolean
Overrides
|
protected
boolean
|
#
_deleteAccountRequests( integer $iAccountId )
Removes all account data from database.
Removes all account data from database.
Parameters
- $iAccountId
- Identifier of account to remove.
Returns
boolean
|
public
array
|
#
getAccountIdList( integer $iUserId )
Retrieves list of accounts for given WebMail Pro user.
Retrieves list of accounts for given WebMail Pro user.
Parameters
- $iUserId
- User identifier.
Returns
array | false
Overrides
|
public
array
|
#
getUserAccounts( integer $iUserId )
Retrieves list of information about email accounts for specific user.
Retrieves list of information about email accounts for specific user.
Parameters
- $iUserId
- User identifier.
Returns
array | false array(int IdAccount => array(bool isDefaultAccount, string email, string friendlyName, string signature, int isSignatureHtml, int isSignatureAdded))
Overrides
|
public
integer
|
#
getUserAccountId( integer $iUserId, string $sEmail )
Returns account identifier for specific user and account email.
Returns account identifier for specific user and account email.
Parameters
- $iUserId
- Identifier of user that contains account.
- $sEmail
- Email of account that is looked up.
Returns
integer | false
|
public
array
|
#
getUserList( integer $iDomainId, integer $iPage, integer $iUsersPerPage, string $sOrderBy = 'email', boolean $bAscOrderType = true, string $sSearchDesc = '' )
Obtains list of information about users for specific domain. Domain identifier is used for look up.
The answer contains information only about default account of founded user.
Obtains list of information about users for specific domain. Domain identifier is used for look up.
The answer contains information only about default account of founded user.
Parameters
- $iDomainId
- Domain identifier.
- $iPage
- List page.
- $iUsersPerPage
- Number of users on a single page.
- $sOrderBy
- = 'email'. Field by which to sort.
- $bAscOrderType
- = true. If true the sort order type is ascending.
- $sSearchDesc
- = ''. If specified, the search goes on by substring in the name and email of default account.
Returns
array | false [IdAccount => [IsMailingList, Email, FriendlyName, IsDisabled, IdUser, StorageQuota, LastLogin]]
Overrides
|
public
array
|
#
getDefaultAccountIdList( integer $iDomainId, integer $iPage, integer $iUsersPerPage )
Obtains list of identifiers of accounts which are specified as default. Domain identifier is used for look up.
Obtains list of identifiers of accounts which are specified as default. Domain identifier is used for look up.
Parameters
- $iDomainId
- Domain identifier.
- $iPage
- List page.
- $iUsersPerPage
- Number of identifiers on a single page.
Returns
array | false
Overrides
|
public
array
|
#
getDefaultAccountList( )
Obtains list of accounts which are specified as default.
Obtains list of accounts which are specified as default.
Returns
array | false
Overrides
|
public
array
|
#
getTwilioNumbers( $iTenantId )
Obtains twilio numbers for default accounts with allowed twilio. Tenant identifier is used for look up.
Obtains twilio numbers for default accounts with allowed twilio. Tenant identifier is used for look up.
Parameters
Returns
array | false
|
public
integer
|
#
getUsersCountForDomain( integer $iDomainId, string $sSearchDesc = '' )
Determines how many users are in particular domain, with optional filtering. Domain identifier is used for look up.
Determines how many users are in particular domain, with optional filtering. Domain identifier is used for look up.
Parameters
- $iDomainId
- Domain identifier.
- $sSearchDesc
- = '' If not empty, only users matching this pattern are counted.
Returns
integer | false
Overrides
|
public
integer
|
#
getUsersCountForTenant( integer $iTenantId )
Determines how many users are in particular tenant. Tenant identifier is used for look up.
Determines how many users are in particular tenant. Tenant identifier is used for look up.
Parameters
- $iTenantId
- Tenant identifier.
Returns
integer | false
Overrides
|
public
integer
|
#
getTotalUsersCount( )
Calculates total number of users registered in WebMail Pro.
Calculates total number of users registered in WebMail Pro.
Returns
integer
Overrides
|
public
boolean
|
#
createCalUser( CCalUser & $oCalUser )
Creates calendar user in storage.
Creates calendar user in storage.
Parameters
- $oCalUser
- $oCalUser CCalUser object.
Returns
boolean
Overrides
|
public
CCalUser
|
#
getCalUser( integer $iUserId )
Obtains CCalUser object that contains calendar settings for specified user. User identifier is used for look up.
Obtains CCalUser object that contains calendar settings for specified user. User identifier is used for look up.
Parameters
- $iUserId
- User identifier.
Returns
Overrides
|
public
boolean
|
#
deleteCalUser( integer $iUserId )
Deletes calendar user settings from the storage. User identifier is used for look up.
Deletes calendar user settings from the storage. User identifier is used for look up.
Parameters
- $iUserId
- User identifier.
Returns
boolean
Overrides
|
public
boolean
|
#
updateCalUser( CCalUser $oCalUser )
Updates calendar user settings.
Updates calendar user settings.
Parameters
- $oCalUser
- CCalUser object.
Returns
boolean
Overrides
|
public
boolean
|
#
getSafetySender( string $iUserId, string $sEmail )
Checks whether specific address is in safelist for particular user.
Checks whether specific address is in safelist for particular user.
Parameters
- $iUserId
- User identifier.
- $sEmail
- Email of sender.
Returns
boolean
|
public
boolean
|
#
setSafetySender( string $iUserId, string $sEmail )
Updates a list of senders wich are considered safe to show external images coming from.
Updates a list of senders wich are considered safe to show external images coming from.
Parameters
- $iUserId
- User identifier.
- $sEmail
- Email of sender wich is considered safe.
Returns
boolean
|
public
boolean
|
#
clearSafetySenders( string $iUserId )
Purges all entries in safelist of particular user.
Purges all entries in safelist of particular user.
Parameters
- $iUserId
- User identifier.
Returns
boolean
|
protected
string
|
#
_getDbOrderBy( string $sOrderBy )
Returns the real name of the field to sort.
Returns the real name of the field to sort.
Parameters
- $sOrderBy
- Name of the field to sort.
Returns
string
|