Differential D20717 Diff 49434 src/applications/phortune/controller/account/PhortuneAccountEmailEditController.php
Changeset View
Changeset View
Standalone View
Standalone View
src/applications/phortune/controller/account/PhortuneAccountEmailEditController.php
<?php | <?php | ||||
final class PhortuneAccountEmailEditController | final class PhortuneAccountEmailEditController | ||||
extends PhortuneAccountController { | extends PhortuneAccountController { | ||||
public function handleRequest(AphrontRequest $request) { | protected function shouldRequireAccountEditCapability() { | ||||
$engine = id(new PhortuneAccountEmailEditEngine()) | return true; | ||||
->setController($this); | |||||
if (!$request->getURIData('id')) { | |||||
if (!$request->getURIData('accountID')) { | |||||
return new Aphront404Response(); | |||||
} | |||||
$response = $this->loadAccount(); | |||||
if ($response) { | |||||
return $response; | |||||
} | } | ||||
protected function handleAccountRequest(AphrontRequest $request) { | |||||
$account = $this->getAccount(); | $account = $this->getAccount(); | ||||
$engine = id(new PhortuneAccountEmailEditEngine()) | |||||
->setController($this); | |||||
if (!$request->getURIData('id')) { | |||||
$engine->setAccount($account); | $engine->setAccount($account); | ||||
} | } | ||||
return $engine->buildResponse(); | return $engine->buildResponse(); | ||||
} | } | ||||
} | } |