Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96190127
PhabricatorPeopleDisableController.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Mute Notifications
Award Token
Subscribers
None
File Metadata
Details
File Info
Storage
Attached
Created
Mon, Dec 23, 14:39
Size
1 KB
Mime Type
text/x-php
Expires
Wed, Dec 25, 14:39 (2 d)
Engine
blob
Format
Raw Data
Handle
23141348
Attached To
rPH Phabricator
PhabricatorPeopleDisableController.php
View Options
<?php
final
class
PhabricatorPeopleDisableController
extends
PhabricatorPeopleController
{
private
$id
;
public
function
willProcessRequest
(
array
$data
)
{
$this
->
id
=
idx
(
$data
,
'id'
);
}
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$admin
=
$request
->
getUser
();
$user
=
id
(
new
PhabricatorPeopleQuery
())
->
setViewer
(
$admin
)
->
withIDs
(
array
(
$this
->
id
))
->
executeOne
();
if
(!
$user
)
{
return
new
Aphront404Response
();
}
$done_uri
=
$this
->
getApplicationURI
(
'query/approval/'
);
if
(
$request
->
isFormPost
())
{
id
(
new
PhabricatorUserEditor
())
->
setActor
(
$admin
)
->
disableUser
(
$user
,
true
);
return
id
(
new
AphrontRedirectResponse
())->
setURI
(
$done_uri
);
}
$dialog
=
id
(
new
AphrontDialogView
())
->
setUser
(
$admin
)
->
setTitle
(
pht
(
'Confirm Disable'
))
->
appendChild
(
pht
(
'Disable %s? They will no longer be able to access Phabricator or '
.
'receive email.'
,
phutil_tag
(
'strong'
,
array
(),
$user
->
getUsername
())))
->
addCancelButton
(
$done_uri
)
->
addSubmitButton
(
pht
(
'Disable Account'
));
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
}
Event Timeline
Log In to Comment