Changeset View
Changeset View
Standalone View
Standalone View
src/applications/people/mail/PhabricatorPeopleWelcomeMailEngine.php
Show First 20 Lines • Show All 112 Lines • ▼ Show 20 Lines | return id(new PhabricatorMetaMTAMail()) | ||||
PlatformSymbols::getPlatformServerName())) | PlatformSymbols::getPlatformServerName())) | ||||
->setBody($message); | ->setBody($message); | ||||
} | } | ||||
private function newBody() { | private function newBody() { | ||||
$recipient = $this->getRecipient(); | $recipient = $this->getRecipient(); | ||||
$custom_body = $this->getWelcomeMessage(); | $custom_body = $this->getWelcomeMessage(); | ||||
if (strlen($custom_body)) { | if ($custom_body !== null && strlen($custom_body)) { | ||||
return $this->newRemarkupText($custom_body); | return $this->newRemarkupText($custom_body); | ||||
} | } | ||||
$default_body = PhabricatorAuthMessage::loadMessageText( | $default_body = PhabricatorAuthMessage::loadMessageText( | ||||
$recipient, | $recipient, | ||||
PhabricatorAuthWelcomeMailMessageType::MESSAGEKEY); | PhabricatorAuthWelcomeMailMessageType::MESSAGEKEY); | ||||
if (strlen($default_body)) { | if ($default_body !== null && strlen($default_body)) { | ||||
return $this->newRemarkupText($default_body); | return $this->newRemarkupText($default_body); | ||||
} | } | ||||
$is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | $is_serious = PhabricatorEnv::getEnvConfig('phabricator.serious-business'); | ||||
if (!$is_serious) { | if (!$is_serious) { | ||||
return pht( | return pht( | ||||
"Love,\n%s", | "Love,\n%s", | ||||
PlatformSymbols::getPlatformServerName()); | PlatformSymbols::getPlatformServerName()); | ||||
} | } | ||||
return null; | return null; | ||||
} | } | ||||
} | } |