Correct a parameter order swap in "diffusion.historyquery" for Mercurial
[phabricator.git] / src / applications / people / controller / PhabricatorPeopleDeleteController.php
blob8e6ac91da73f31cdfb050e6c5a7a4920da5c9522
1 <?php
3 final class PhabricatorPeopleDeleteController
4 extends PhabricatorPeopleController {
6 public function handleRequest(AphrontRequest $request) {
7 $viewer = $request->getUser();
8 $id = $request->getURIData('id');
10 $user = id(new PhabricatorPeopleQuery())
11 ->setViewer($viewer)
12 ->withIDs(array($id))
13 ->executeOne();
14 if (!$user) {
15 return new Aphront404Response();
18 $manage_uri = $this->getApplicationURI("manage/{$id}/");
20 $doc_uri = PhabricatorEnv::getDoclink(
21 'Permanently Destroying Data');
23 return $this->newDialog()
24 ->setTitle(pht('Delete User'))
25 ->appendParagraph(
26 pht(
27 'To permanently destroy this user, run this command from the '.
28 'command line:'))
29 ->appendCommand(
30 csprintf(
31 'phabricator/ $ ./bin/remove destroy %R',
32 $user->getMonogram()))
33 ->appendParagraph(
34 pht(
35 'Unless you have a very good reason to delete this user, consider '.
36 'disabling them instead.'))
37 ->appendParagraph(
38 pht(
39 'Users can not be permanently destroyed from the web interface. '.
40 'See %s in the documentation for more information.',
41 phutil_tag(
42 'a',
43 array(
44 'href' => $doc_uri,
45 'target' => '_blank',
47 pht('Permanently Destroying Data'))))
48 ->addCancelButton($manage_uri, pht('Close'));