Page Menu
Home
c4science
Search
Configure Global Search
Log In
Files
F96125366
PhabricatorPasswordDestructionEngineExtension.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
Sun, Dec 22, 22:23
Size
635 B
Mime Type
text/x-php
Expires
Tue, Dec 24, 22:23 (2 d)
Engine
blob
Format
Raw Data
Handle
23128091
Attached To
rPH Phabricator
PhabricatorPasswordDestructionEngineExtension.php
View Options
<?php
final
class
PhabricatorPasswordDestructionEngineExtension
extends
PhabricatorDestructionEngineExtension
{
const
EXTENSIONKEY
=
'passwords'
;
public
function
getExtensionName
()
{
return
pht
(
'Passwords'
);
}
public
function
destroyObject
(
PhabricatorDestructionEngine
$engine
,
$object
)
{
$viewer
=
$engine
->
getViewer
();
$object_phid
=
$object
->
getPHID
();
$passwords
=
id
(
new
PhabricatorAuthPasswordQuery
())
->
setViewer
(
$viewer
)
->
withObjectPHIDs
(
array
(
$object_phid
))
->
execute
();
foreach
(
$passwords
as
$password
)
{
$engine
->
destroyObject
(
$password
);
}
}
}
Event Timeline
Log In to Comment