芝麻web文件管理V1.00
编辑当前文件:/home/pulsehostuk9/public_html/cloud.pulsehost.co.uk/modules/Mail/Models/MailAccount.php
'array', 'IncomingPassword' => \Aurora\System\Casts\Encrypt::class, 'IsDisabled' => 'boolean', 'UseToAuthorize' => 'boolean', 'IncludeInUnifiedMailbox' => 'boolean', 'UseSignature' => 'boolean', 'ShowUnifiedMailboxLabel' => 'boolean', 'UseThreading' => 'boolean', 'SaveRepliesToCurrFolder' => 'boolean', 'FoldersOrder' => 'string' ]; protected $attributes = [ ]; protected $appends = [ 'EntityId' ]; public function setPassword($sPassword) { $this->IncomingPassword = $sPassword; } public function getPassword() { return $this->IncomingPassword; } private function canBeUsedToAuthorize() { $oMailModule = \Aurora\System\Api::GetModule('Mail'); if ($oMailModule instanceof Module) { return !$oMailModule->getAccountsManager()->useToAuthorizeAccountExists($this->Email, $this->Id); } else { return false; } } public function getDefaultTimeOffset() { return 0; } public function toResponseArray() { $aResponse = parent::toResponseArray(); $aResponse['AccountID'] = $this->Id; $aResponse['AllowFilters'] = false; $aResponse['AllowForward'] = false; $aResponse['AllowAutoresponder'] = false; $aResponse['EnableAllowBlockLists'] = false; if (!isset($aResponse['Signature'])) { $aResponse['Signature'] = ''; } $oServer = $this->getServer(); if ($oServer instanceof \Aurora\Modules\Mail\Models\Server) { $aResponse['Server'] = $oServer->toResponseArray(); $oMailModule = \Aurora\Modules\Mail\Module::getInstance(); if ($oServer->EnableSieve && $oMailModule) { $aResponse['AllowFilters'] = $oMailModule->oModuleSettings->AllowFilters; $aResponse['AllowForward'] = $oMailModule->oModuleSettings->AllowForward; $aResponse['AllowAutoresponder'] = $oMailModule->oModuleSettings->AllowAutoresponder; $aResponse['EnableAllowBlockLists'] = $oMailModule->oModuleSettings->EnableAllowBlockLists; } } $aResponse['CanBeUsedToAuthorize'] = $this->canBeUsedToAuthorize(); $aArgs = ['Account' => $this]; \Aurora\System\Api::GetModule('Core')->broadcastEvent( 'Mail::Account::ToResponseArray', $aArgs, $aResponse ); return $aResponse; } public function getServer() { return $this->Server; } public function getLogin() { $oServer = $this->getServer(); if ($oServer && !$oServer->UseFullEmailAddressAsLogin) { return $this->Email; } return $this->IncomingLogin; } public function Server() { return $this->belongsTo(Server::class, 'ServerId', 'Id'); } }