1
0
Fork 0
mirror of https://we.phorge.it/source/arcanist.git synced 2024-11-22 14:52:40 +01:00

Use user.query, not user.find, in arc tasks

Summary: I'm going to deprecate `user.find`, `user.query` is more modern/powerful and obsoletes it.

Test Plan: Ran `arc tasks --owner epriestley`.

Reviewers: btrahan

Reviewed By: btrahan

CC: aran

Differential Revision: https://secure.phabricator.com/D8070
This commit is contained in:
epriestley 2014-01-25 14:23:23 -08:00
parent 2c2c5663cb
commit e4b1e8e681

View file

@ -228,13 +228,18 @@ EOTEXT
private function findOwnerPHID($owner) { private function findOwnerPHID($owner) {
$conduit = $this->getConduit(); $conduit = $this->getConduit();
$owner_phid = $conduit->callMethodSynchronous( $users = $conduit->callMethodSynchronous(
'user.find', 'user.query',
array( array(
'aliases' => array($owner), 'usernames' => array($owner),
)); ));
return idx($owner_phid, $owner); if (!$users) {
return null;
}
$user = head($users);
return idx($user, 'phid');
} }
private function loadManiphestTasks($status, $owner_phid, $order, $limit) { private function loadManiphestTasks($status, $owner_phid, $order, $limit) {