Remove all "FileHasObject" edge reads and writes
[phabricator.git] / src / applications / auth / extension / PhabricatorPasswordDestructionEngineExtension.php
blob7b28044b0bddcd87ec302facca160a7cae105c59
1 <?php
3 final class PhabricatorPasswordDestructionEngineExtension
4 extends PhabricatorDestructionEngineExtension {
6 const EXTENSIONKEY = 'passwords';
8 public function getExtensionName() {
9 return pht('Passwords');
12 public function destroyObject(
13 PhabricatorDestructionEngine $engine,
14 $object) {
16 $viewer = $engine->getViewer();
17 $object_phid = $object->getPHID();
19 $passwords = id(new PhabricatorAuthPasswordQuery())
20 ->setViewer($viewer)
21 ->withObjectPHIDs(array($object_phid))
22 ->execute();
24 foreach ($passwords as $password) {
25 $engine->destroyObject($password);