示例#1
0
 /**
  * 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.
  * 
  * @param int $iDomainId Domain identifier.
  * @param int $iPage List page.
  * @param int $iUsersPerPage Number of users on a single page.
  * @param string $sOrderBy = 'email'. Field by which to sort.
  * @param bool $bAscOrderType = true. If **true** the sort order type is ascending.
  * @param string $sSearchDesc = ''. If specified, the search goes on by substring in the name and email of default account.
  * 
  * @return array | false [IdAccount => [IsMailingList, Email, FriendlyName, IsDisabled, IdUser, StorageQuota, LastLogin]]
  */
 public function getUserList($iDomainId, $iPage, $iUsersPerPage, $sOrderBy = 'email', $bAscOrderType = true, $sSearchDesc = '')
 {
     $aUsers = false;
     if ($this->oConnection->Execute($this->oCommandCreator->getSelectUserListQuery($iDomainId, $iPage, $iUsersPerPage, $this->_getDbOrderBy($sOrderBy), $bAscOrderType, $sSearchDesc))) {
         $oRow = null;
         $aUsers = array();
         while (false !== ($oRow = $this->oConnection->GetNextRecord())) {
             $aUsers[$oRow->id_acct] = array((bool) $oRow->mailing_list, $oRow->email, $oRow->friendly_nm, (bool) $oRow->deleted, $oRow->id_user, $oRow->quota, $oRow->last_login);
         }
     }
     $this->throwDbExceptionIfExist();
     return $aUsers;
 }