Beispiel #1
0
 /**
  * @param string $email
  * @param string $login
  * @return Account
  */
 function &SelectAccountFullDataByLogin($email, $login)
 {
     $null = null;
     if (!$this->_dbConnection->Execute($this->_commandCreator->SelectAccountFullDataByLogin($email, $login))) {
         return $null;
     }
     $account = new Account();
     $row = $this->_dbConnection->GetNextRecord();
     if ($row) {
         $account->Id = (int) $row->id_acct;
         $account->IdUser = (int) $row->id_user;
         $account->IdDomain = (int) $row->id_domain;
         $account->DefaultAccount = (bool) $row->def_acct;
         $account->Deleted = (bool) $row->deleted;
         $account->Email = $row->email;
         $account->MailProtocol = (int) $row->mail_protocol;
         $account->MailIncHost = $row->mail_inc_host;
         $account->MailIncLogin = $row->mail_inc_login;
         $account->MailIncPort = (int) $row->mail_inc_port;
         $account->MailOutHost = $row->mail_out_host;
         $account->MailOutLogin = $row->mail_out_login;
         $account->MailOutPort = (int) $row->mail_out_port;
         $account->MailOutAuthentication = (int) $row->mail_out_auth;
         $account->FriendlyName = $row->friendly_nm;
         $account->UseFriendlyName = (bool) $row->use_friendly_nm;
         $account->DefaultOrder = (int) $row->def_order;
         $account->GetMailAtLogin = (bool) $row->getmail_at_login;
         $account->MailMode = (int) $row->mail_mode;
         $account->MailsOnServerDays = (int) $row->mails_on_server_days;
         $account->SignatureType = (int) $row->signature_type;
         $account->SignatureOptions = (int) $row->signature_opt;
         $account->HideContacts = (bool) $row->hide_contacts;
         $account->MailsPerPage = (int) $row->msgs_per_page;
         $account->Delimiter = $row->delimiter;
         $account->NameSpace = $row->personal_namespace;
         $account->WhiteListing = (bool) $row->white_listing;
         $account->XSpam = (bool) $row->x_spam;
         $account->LastLogin = (int) $row->last_login;
         $account->LoginsCount = (int) $row->logins_count;
         $account->DefaultSkin = $row->def_skin;
         $account->DefaultLanguage = $row->def_lang;
         $account->DefaultIncCharset = ConvertUtils::GetCodePageName((int) $row->def_charset_inc);
         $account->DefaultOutCharset = ConvertUtils::GetCodePageName((int) $row->def_charset_out);
         $account->DefaultTimeZone = (int) $row->def_timezone;
         $account->DefaultDateFormat = $row->def_date_fmt;
         $account->HideFolders = (bool) $row->hide_folders;
         $account->MailboxLimit = GetGoodBigInt($row->mailbox_limit);
         $account->MailboxSize = GetGoodBigInt($row->mailbox_size);
         $account->AllowChangeSettings = (bool) $row->allow_change_settings;
         $account->AllowDhtmlEditor = (bool) $row->allow_dhtml_editor;
         $account->AllowDirectMode = (bool) $row->allow_direct_mode;
         $account->DbCharset = ConvertUtils::GetCodePageName((int) $row->db_charset);
         $account->HorizResizer = (int) $row->horiz_resizer;
         $account->VertResizer = (int) $row->vert_resizer;
         $account->Mark = (int) $row->mark;
         $account->Reply = (int) $row->reply;
         $account->ContactsPerPage = (int) $row->contacts_per_page;
         $account->ViewMode = (int) $row->view_mode;
         $account->ImapQuota = (int) $row->imap_quota;
         $account->MailIncPassword = ConvertUtils::DecodePassword($row->mail_inc_pass, $account);
         $account->MailOutPassword = ConvertUtils::DecodePassword($row->mail_out_pass, $account);
         $this->_dbConnection->FreeResult();
     } else {
         $account = $null;
     }
     if (!is_object($account) || !$this->_dbConnection->Execute($this->_commandCreator->SelectSignature($account->Id))) {
         return $null;
     }
     $row = $this->_dbConnection->GetNextRecord();
     if ($row) {
         $account->Signature = $row->signature;
         $this->_dbConnection->FreeResult();
     }
     return $account;
 }