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