Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
freebsd
GitHub Repository: freebsd/phabricator
Path: blob/master/src/applications/people/controller/PhabricatorPeopleDeleteController.php
12262 views
1
<?php
2
3
final class PhabricatorPeopleDeleteController
4
extends PhabricatorPeopleController {
5
6
public function handleRequest(AphrontRequest $request) {
7
$viewer = $request->getUser();
8
$id = $request->getURIData('id');
9
10
$user = id(new PhabricatorPeopleQuery())
11
->setViewer($viewer)
12
->withIDs(array($id))
13
->executeOne();
14
if (!$user) {
15
return new Aphront404Response();
16
}
17
18
$manage_uri = $this->getApplicationURI("manage/{$id}/");
19
20
$doc_uri = PhabricatorEnv::getDoclink(
21
'Permanently Destroying Data');
22
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',
46
),
47
pht('Permanently Destroying Data'))))
48
->addCancelButton($manage_uri, pht('Close'));
49
}
50
51
}
52
53