Page Menu
Home
Phorge
Search
Configure Global Search
Log In
Files
F538710
DiffusionRepositoryIdentityDestructionEngineExtension.php
No One
Temporary
Actions
Download File
Edit File
Delete File
View Transforms
Subscribe
Flag For Later
Award Token
Size
1 KB
Referenced Files
None
Subscribers
None
DiffusionRepositoryIdentityDestructionEngineExtension.php
View Options
<?php
final
class
DiffusionRepositoryIdentityDestructionEngineExtension
extends
PhabricatorDestructionEngineExtension
{
const
EXTENSIONKEY
=
'repository-identities'
;
public
function
getExtensionName
()
{
return
pht
(
'Repository Identities'
);
}
public
function
didDestroyObject
(
PhabricatorDestructionEngine
$engine
,
$object
)
{
// When users or email addresses are destroyed, queue a task to update
// any repository identities that are associated with them. See T13444.
$related_phids
=
array
();
$email_addresses
=
array
();
if
(
$object
instanceof
PhabricatorUser
)
{
$related_phids
[]
=
$object
->
getPHID
();
}
if
(
$object
instanceof
PhabricatorUserEmail
)
{
$email_addresses
[]
=
$object
->
getAddress
();
}
if
(
$related_phids
||
$email_addresses
)
{
PhabricatorWorker
::
scheduleTask
(
'PhabricatorRepositoryIdentityChangeWorker'
,
array
(
'relatedPHIDs'
=>
$related_phids
,
'emailAddresses'
=>
$email_addresses
,
));
}
}
}
File Metadata
Details
Attached
Mime Type
text/x-php
Expires
Mon, May 12, 8:54 AM (1 d, 21 h)
Storage Engine
blob
Storage Format
Raw Data
Storage Handle
105349
Default Alt Text
DiffusionRepositoryIdentityDestructionEngineExtension.php (1 KB)
Attached To
Mode
rP Phorge
Attached
Detach File
Event Timeline
Log In to Comment