mirror of
https://we.phorge.it/source/phorge.git
synced 2024-12-23 14:00:56 +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->delete();
|
||||
|
||||
$externals = id(new PhabricatorExternalAccount())->loadAllWhere(
|
||||
'userPHID = %s',
|
||||
$this->getPHID());
|
||||
$externals = id(new PhabricatorExternalAccountQuery())
|
||||
->setViewer($engine->getViewer())
|
||||
->withUserPHIDs(array($this->getPHID()))
|
||||
->execute();
|
||||
foreach ($externals as $external) {
|
||||
$external->delete();
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue