Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F102511500
PhabricatorLDAPUnlinkController.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
Fri, Feb 21, 11:58
Size
1012 B
Mime Type
text/x-php
Expires
Sun, Feb 23, 11:58 (1 d, 23 h)
Engine
blob
Format
Raw Data
Handle
24339082
Attached To
rPH Phabricator
PhabricatorLDAPUnlinkController.php
View Options
<?php
final
class
PhabricatorLDAPUnlinkController
extends
PhabricatorAuthController
{
public
function
processRequest
()
{
$request
=
$this
->
getRequest
();
$user
=
$request
->
getUser
();
$ldap_info
=
id
(
new
PhabricatorUserLDAPInfo
())->
loadOneWhere
(
'userID = %d'
,
$user
->
getID
());
if
(!
$ldap_info
)
{
return
new
Aphront400Response
();
}
if
(!
$request
->
isDialogFormPost
())
{
$dialog
=
new
AphrontDialogView
();
$dialog
->
setUser
(
$user
);
$dialog
->
setTitle
(
pht
(
'Really unlink account?'
));
$dialog
->
appendChild
(
phutil_tag
(
'p'
,
array
(),
pht
(
'You will not be able to login using this account '
.
'once you unlink it. Continue?'
)));
$dialog
->
addSubmitButton
(
pht
(
'Unlink Account'
));
$dialog
->
addCancelButton
(
'/settings/panel/ldap/'
);
return
id
(
new
AphrontDialogResponse
())->
setDialog
(
$dialog
);
}
$ldap_info
->
delete
();
return
id
(
new
AphrontRedirectResponse
())
->
setURI
(
'/settings/panel/ldap/'
);
}
}
Event Timeline
Log In to Comment