mirror of
https://we.phorge.it/source/phorge.git
synced 2024-11-22 14:52:41 +01:00
Convert a manual query against external accounts into a modern Query
Summary: Depends on D20108. Ref T6703. Update this outdated callsite to a more modern appraoch. Test Plan: Destroyed a user with `bin/remove destroy`. Reviewers: amckinley Reviewed By: amckinley Maniphest Tasks: T6703 Differential Revision: https://secure.phabricator.com/D20109
This commit is contained in:
parent
f0364eef8a
commit
8054f7d191
1 changed files with 4 additions and 3 deletions
|
@ -1131,9 +1131,10 @@ final class PhabricatorUser
|
||||||
$this->openTransaction();
|
$this->openTransaction();
|
||||||
$this->delete();
|
$this->delete();
|
||||||
|
|
||||||
$externals = id(new PhabricatorExternalAccount())->loadAllWhere(
|
$externals = id(new PhabricatorExternalAccountQuery())
|
||||||
'userPHID = %s',
|
->setViewer($engine->getViewer())
|
||||||
$this->getPHID());
|
->withUserPHIDs(array($this->getPHID()))
|
||||||
|
->execute();
|
||||||
foreach ($externals as $external) {
|
foreach ($externals as $external) {
|
||||||
$external->delete();
|
$external->delete();
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue