/** * @param stdClass $oRow */ public function InitByDbRow($oRow) { parent::InitByDbRow($oRow); $this->InitBeforeChange(); $this->FlushObsolete(); }
/** * @param stdClass $oRow */ public function InitByDbRow($oRow) { parent::InitByDbRow($oRow); if (!$this->ReadOnly && (EContactType::Global_ === $this->Type || EContactType::GlobalAccounts === $this->Type || EContactType::GlobalMailingList === $this->Type)) { $this->ReadOnly = true; } if (EContactType::GlobalAccounts === $this->Type || EContactType::GlobalMailingList === $this->Type) { $this->Global = true; } }
/** * @param stdClass $oRow */ public function InitByDbRow($oRow) { parent::InitByDbRow($oRow); if (!$this->Domain->IsDefaultDomain) { $this->IncomingMailProtocol = $this->Domain->IncomingMailProtocol; $this->IncomingMailServer = $this->Domain->IncomingMailServer; $this->IncomingMailPort = $this->Domain->IncomingMailPort; $this->IncomingMailUseSSL = $this->Domain->IncomingMailUseSSL; $this->OutgoingMailServer = $this->Domain->OutgoingMailServer; $this->OutgoingMailPort = $this->Domain->OutgoingMailPort; $this->OutgoingMailAuth = $this->Domain->OutgoingMailAuth; $this->OutgoingMailUseSSL = $this->Domain->OutgoingMailUseSSL; $this->OutgoingSendingMethod = $this->Domain->OutgoingSendingMethod; if (ESMTPAuthType::AuthSpecified === $this->OutgoingMailAuth) { $this->OutgoingMailLogin = $this->Domain->OutgoingMailLogin; $this->OutgoingMailPassword = $this->Domain->OutgoingMailPassword; } } if ($this->IsMailingList) { $this->IdUser = 0; } if ($this->IsInternal) { if ((int) CApi::GetConf('labs.unlim-quota-limit-size-in-kb', 104857600) <= $this->StorageQuota) { $this->StorageQuota = 0; $this->FlushObsolete('StorageQuota'); } $oApiUsersManager = CApi::Manager('users'); if ($oApiUsersManager) { $this->StorageUsedSpace = $oApiUsersManager->GetAccountUsedSpaceInKBytesByEmail($this->Email); $this->FlushObsolete('StorageUsedSpace'); } } }