Changeset View
Changeset View
Standalone View
Standalone View
src/applications/auth/controller/PhabricatorEmailLoginController.php
Show First 20 Lines • Show All 98 Lines • ▼ Show 20 Lines | if ($request->isFormPost()) { | ||||
'a verified address instead.'); | 'a verified address instead.'); | ||||
$e_email = pht('Unverified'); | $e_email = pht('Unverified'); | ||||
} | } | ||||
} | } | ||||
if (!$errors) { | if (!$errors) { | ||||
$target_address = new PhutilEmailAddress($target_email->getAddress()); | $target_address = new PhutilEmailAddress($target_email->getAddress()); | ||||
$user_log = PhabricatorUserLog::initializeNewLog( | |||||
$viewer, | |||||
$target_user->getPHID(), | |||||
PhabricatorEmailLoginUserLogType::LOGTYPE); | |||||
$mail_engine = id(new PhabricatorPeopleEmailLoginMailEngine()) | $mail_engine = id(new PhabricatorPeopleEmailLoginMailEngine()) | ||||
->setSender($viewer) | ->setSender($viewer) | ||||
->setRecipient($target_user) | ->setRecipient($target_user) | ||||
->setRecipientAddress($target_address); | ->setRecipientAddress($target_address) | ||||
->setActivityLog($user_log); | |||||
try { | try { | ||||
$mail_engine->validateMail(); | $mail_engine->validateMail(); | ||||
} catch (PhabricatorPeopleMailEngineException $ex) { | } catch (PhabricatorPeopleMailEngineException $ex) { | ||||
return $this->newDialog() | return $this->newDialog() | ||||
->setTitle($ex->getTitle()) | ->setTitle($ex->getTitle()) | ||||
->appendParagraph($ex->getBody()) | ->appendParagraph($ex->getBody()) | ||||
->addCancelButton('/auth/start/', pht('Done')); | ->addCancelButton('/auth/start/', pht('Done')); | ||||
▲ Show 20 Lines • Show All 83 Lines • Show Last 20 Lines |