diff --git a/src/applications/people/conduit/ConduitAPI_user_find_Method.php b/src/applications/people/conduit/ConduitAPI_user_find_Method.php index ab2dadf102..b5e1b06966 100644 --- a/src/applications/people/conduit/ConduitAPI_user_find_Method.php +++ b/src/applications/people/conduit/ConduitAPI_user_find_Method.php @@ -1,19 +1,23 @@ 'required nonempty list' + 'aliases' => 'required list' ); } @@ -27,9 +31,10 @@ final class ConduitAPI_user_find_Method } protected function execute(ConduitAPIRequest $request) { - $users = id(new PhabricatorUser())->loadAllWhere( - 'username in (%Ls)', - $request->getValue('aliases')); + $users = id(new PhabricatorPeopleQuery()) + ->setViewer($request->getUser()) + ->withUsernames($request->getValue('aliases', array())) + ->execute(); return mpull($users, 'getPHID', 'getUsername'); }