3 final class UserFindConduitAPIMethod
extends UserConduitAPIMethod
{
5 public function getAPIMethodName() {
9 public function getMethodStatus() {
10 return self
::METHOD_STATUS_DEPRECATED
;
13 public function getMethodStatusDescription() {
14 return pht('Obsoleted by "%s".', 'user.query');
17 public function getMethodDescription() {
18 return pht('Lookup PHIDs by username. Obsoleted by "%s".', 'user.query');
21 protected function defineParamTypes() {
23 'aliases' => 'required list<string>',
27 protected function defineReturnType() {
28 return 'nonempty dict<string, phid>';
31 protected function execute(ConduitAPIRequest
$request) {
32 $users = id(new PhabricatorPeopleQuery())
33 ->setViewer($request->getUser())
34 ->withUsernames($request->getValue('aliases', array()))
37 return mpull($users, 'getPHID', 'getUsername');